use of org.languagetool.language.Persian in project languagetool by languagetool-org.
the class WordCoherencyRuleTest method testRules.
@Test
public void testRules() throws IOException {
JLanguageTool langTool = new JLanguageTool(new Persian());
TextLevelRule rule = new WordCoherencyRule(TestTools.getMessages("fa"));
assertThat(rule.match(Collections.singletonList(langTool.getAnalyzedSentence("این یک اتاق است."))).length, is(0));
assertThat(rule.match(Collections.singletonList(langTool.getAnalyzedSentence("این یک اتاق است. این یک اطاق است."))).length, is(1));
}
Aggregations