Search in sources :

Example 11 with Catalan

use of org.languagetool.language.Catalan in project languagetool by languagetool-org.

the class ReplaceOperationNamesRuleTest method testPositions.

@Test
public void testPositions() throws IOException {
    final AccentuationCheckRule rule = new AccentuationCheckRule(TestTools.getEnglishMessages());
    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());
}
Also used : RuleMatch(org.languagetool.rules.RuleMatch) JLanguageTool(org.languagetool.JLanguageTool) Catalan(org.languagetool.language.Catalan) Test(org.junit.Test)

Example 12 with Catalan

use of org.languagetool.language.Catalan in project languagetool by languagetool-org.

the class ReplaceOperationNamesRuleTest method setUp.

@Before
public void setUp() throws IOException {
    rule = new ReplaceOperationNamesRule(TestTools.getEnglishMessages());
    langTool = new JLanguageTool(new Catalan());
}
Also used : JLanguageTool(org.languagetool.JLanguageTool) Catalan(org.languagetool.language.Catalan) Before(org.junit.Before)

Example 13 with Catalan

use of org.languagetool.language.Catalan in project languagetool by languagetool-org.

the class SimpleReplaceRuleTest method setUp.

@Before
public void setUp() throws Exception {
    rule = new SimpleReplaceRule(TestTools.getMessages("ca"));
    langTool = new JLanguageTool(new Catalan());
}
Also used : JLanguageTool(org.languagetool.JLanguageTool) Catalan(org.languagetool.language.Catalan) Before(org.junit.Before)

Example 14 with Catalan

use of org.languagetool.language.Catalan in project languagetool by languagetool-org.

the class SimpleReplaceVerbsRuleTest method setUp.

@Before
public void setUp() throws Exception {
    rule = new SimpleReplaceVerbsRule(TestTools.getMessages("ca"));
    langTool = new JLanguageTool(new Catalan());
}
Also used : JLanguageTool(org.languagetool.JLanguageTool) Catalan(org.languagetool.language.Catalan) Before(org.junit.Before)

Example 15 with Catalan

use of org.languagetool.language.Catalan in project languagetool by languagetool-org.

the class CatalanDisambiguationRuleTest method setUp.

@Before
public void setUp() {
    tagger = new CatalanTagger();
    tokenizer = new CatalanWordTokenizer();
    sentenceTokenizer = new SRXSentenceTokenizer(new Catalan());
    disambiguator = new MultiWordChunker("/ca/multiwords.txt", true);
}
Also used : CatalanTagger(org.languagetool.tagging.ca.CatalanTagger) CatalanWordTokenizer(org.languagetool.tokenizers.ca.CatalanWordTokenizer) Catalan(org.languagetool.language.Catalan) SRXSentenceTokenizer(org.languagetool.tokenizers.SRXSentenceTokenizer) Before(org.junit.Before)

Aggregations

Catalan (org.languagetool.language.Catalan)16 JLanguageTool (org.languagetool.JLanguageTool)14 Before (org.junit.Before)9 Test (org.junit.Test)7 RuleMatch (org.languagetool.rules.RuleMatch)6 CatalanTagger (org.languagetool.tagging.ca.CatalanTagger)1 SRXSentenceTokenizer (org.languagetool.tokenizers.SRXSentenceTokenizer)1 CatalanWordTokenizer (org.languagetool.tokenizers.ca.CatalanWordTokenizer)1