Package org.languagetool.language

Examples of org.languagetool.language.Catalan


public class CatalanRuleDisambiguator extends AbstractRuleDisambiguator {

  @Override
  protected Language getLanguage() {
    return new Catalan();
  }
View Full Code Here


  private Rule rule;
  private JLanguageTool langTool;
 
  @Override
  public void setUp() throws IOException {
    rule = new CatalanUnpairedBracketsRule(TestTools.getEnglishMessages(), new Catalan());
    langTool = new JLanguageTool(new Catalan());
  }
View Full Code Here

    final RuleMatch[] matches = rule.match(langTool.getAnalyzedSentence(sentence));
    assertEquals(1, matches.length);
  }
 
  public void testMultipleSentences() throws IOException {
    final JLanguageTool tool = new JLanguageTool(new Catalan());
    tool.enableRule("CA_UNPAIRED_BRACKETS");

    List<RuleMatch> matches;
    matches = tool
        .check("Aquesta és una sentència múltiple amb claudàtors: "
View Full Code Here

  private JLanguageTool langTool;

  @Override
  public void setUp() throws IOException {
    rule = new ComplexAdjectiveConcordanceRule(null);
    langTool = new JLanguageTool(new Catalan());
  }
View Full Code Here

public class MorfologikCatalanSpellerRuleTest {

    @Test
    public void testMorfologikSpeller() throws IOException {
        MorfologikCatalanSpellerRule rule =
                new MorfologikCatalanSpellerRule (TestTools.getMessages("Catalan"), new Catalan());

        RuleMatch[] matches;
        JLanguageTool langTool = new JLanguageTool(new Catalan());

        // prefixes and suffixes.
        assertEquals(0, rule.match(langTool.getAnalyzedSentence("S'autodefineixin com a populars.")).length);
        assertEquals(0, rule.match(langTool.getAnalyzedSentence("Redibuixen el futur.")).length);
        assertEquals(0, rule.match(langTool.getAnalyzedSentence("L'exdirigent del partit.")).length);
View Full Code Here

  private JLanguageTool         langTool;

  @Override
  public void setUp() throws IOException {
    rule = new AccentuationCheckRule(null);
    langTool = new JLanguageTool(new Catalan());
  }
View Full Code Here

  }

  public void testPositions() throws IOException {
    final AccentuationCheckRule rule = new AccentuationCheckRule(null);
    final RuleMatch[] matches;
    final JLanguageTool langTool = new JLanguageTool(new Catalan());

    matches = rule.match(langTool
        .getAnalyzedSentence("Són circumstancies extraordinàries."));
    assertEquals(4, matches[0].getFromPos());
    assertEquals(18, matches[0].getToPos());
View Full Code Here

  private JLanguageTool langTool;

  @Override
  public void setUp() throws IOException {
    rule = new ReflexiveVerbsRule(null);
    langTool = new JLanguageTool(new Catalan());
  }
View Full Code Here

    tagger = new CatalanTagger();
    tokenizer = new WordTokenizer();
  }
 
  public void testDictionary() throws IOException {
    TestTools.testDictionary(tagger, new Catalan());
  }
View Full Code Here

import org.languagetool.language.Catalan;

public class CatalanConcurrencyTest extends AbstractLanguageConcurrencyTest {
  @Override
  protected Language createLanguage() {
    return new Catalan();
  }
View Full Code Here

TOP

Related Classes of org.languagetool.language.Catalan

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.