Examples of Catalan


Examples of org.languagetool.language.Catalan

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

Examples of org.languagetool.language.Catalan

  private TextLevelRule 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

Examples of org.languagetool.language.Catalan

    final RuleMatch[] matches = rule.match(Collections.singletonList(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

Examples of org.languagetool.language.Catalan

  private JLanguageTool langTool;

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

Examples of org.languagetool.language.Catalan

  /*
   * Test method for 'org.languagetool.rules.ca.CatalanWordRepeatRule.match(AnalyzedSentence)'
   */
  public void testRule() throws IOException {
    final CatalanWordRepeatRule rule = new CatalanWordRepeatRule(TestTools.getMessages("ca"), new Catalan());
    RuleMatch[] matches;
    JLanguageTool langTool = new JLanguageTool(new Catalan());
    //correct
    matches = rule.match(langTool.getAnalyzedSentence("Sempre pensa en en Joan."));
    assertEquals(0, matches.length);
    matches = rule.match(langTool.getAnalyzedSentence("Els els portaré aviat."));
    assertEquals(0, matches.length);
View Full Code Here

Examples of org.languagetool.language.Catalan

public class MorfologikCatalanSpellerRuleTest {

    @Test
    public void testMorfologikSpeller() throws IOException {
        MorfologikCatalanSpellerRule rule =
                new MorfologikCatalanSpellerRule (TestTools.getMessages("ca"), 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

Examples of org.languagetool.language.Catalan

*/
public class CatalanWrongWordInContextRuleTest extends TestCase {

  public void testRule() throws IOException {
    CatalanWrongWordInContextRule rule = new CatalanWrongWordInContextRule(null);
    JLanguageTool langTool = new JLanguageTool(new Catalan());
   
    // rendible/rentable
    assertEquals(0, rule.match(langTool.getAnalyzedSentence("Una empresa molt rendible.")).length);
    assertEquals(1, rule.match(langTool.getAnalyzedSentence("Una empresa molt rentable.")).length);
    assertEquals(1, rule.match(langTool.getAnalyzedSentence("Uns cultius rentables.")).length);
View Full Code Here

Examples of org.languagetool.language.Catalan

  @Override
  protected void setUp() throws Exception {
    super.setUp();
    rule = new SimpleReplaceRule(TestTools.getMessages("ca"));
    langTool = new JLanguageTool(new Catalan());
  }
View Full Code Here

Examples of org.languagetool.language.Catalan

  private JLanguageTool         langTool;

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

Examples of org.languagetool.language.Catalan

  }

  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
TOP
Copyright © 2018 www.massapi.com. 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.