use of org.languagetool.language.SwissGerman in project languagetool by languagetool-org.
the class GermanSpellerRuleTest method testRuleWithSwissGerman.
// note: copied from HunspellRuleTest
@Test
public void testRuleWithSwissGerman() throws Exception {
SwissGerman language = new SwissGerman();
HunspellRule rule = new GermanSpellerRule(TestTools.getMessages("de"), language);
JLanguageTool lt = new JLanguageTool(language);
commonGermanAsserts(rule, lt);
// ß not allowed in Swiss
assertEquals(1, rule.match(lt.getAnalyzedSentence("Der äußere Übeltäter.")).length);
// ss is used instead of ß
assertEquals(0, rule.match(lt.getAnalyzedSentence("Der äussere Übeltäter.")).length);
}
use of org.languagetool.language.SwissGerman in project languagetool by languagetool-org.
the class HunspellRuleTest method testRuleWithSwissGerman.
@Test
public void testRuleWithSwissGerman() throws Exception {
HunspellRule rule = new HunspellRule(TestTools.getMessages("de"), new SwissGerman());
JLanguageTool langTool = new JLanguageTool(new German());
commonGermanAsserts(rule, langTool);
// ß not allowed in Swiss
assertEquals(1, rule.match(langTool.getAnalyzedSentence("Der äußere Übeltäter.")).length);
// ss is used instead of ß
assertEquals(0, rule.match(langTool.getAnalyzedSentence("Der äussere Übeltäter.")).length);
}
Aggregations