Examples of SpellingCheckRule


Examples of org.languagetool.rules.spelling.SpellingCheckRule

    Assert.assertEquals(GermanSpellerRule.RULE_ID, matches2.get(0).getRule().getId());
  }

  public void testIgnoreSuggestionsWithDynamicHunspellRule() throws IOException {
    final JLanguageTool langTool = new JLanguageTool(new GermanyGerman());
    final SpellingCheckRule rule = new HunspellNoSuggestionRule(TestTools.getEnglishMessages(), new GermanyGerman());
    langTool.addRule(rule);
    langTool.disableRule(GermanSpellerRule.RULE_ID);
    final List<RuleMatch> matches = langTool.check("Das ist ein Tibbfehla.");
    assertEquals(1, matches.size());
    assertEquals(HunspellNoSuggestionRule.RULE_ID, matches.get(0).getRule().getId());
View Full Code Here

Examples of org.languagetool.rules.spelling.SpellingCheckRule

    assertEquals("MORFOLOGIK_RULE_EN_US", matches2.get(0).getRule().getId());
  }

  public void testIgnoreSuggestionsWithDynamicMorfologikRule() throws IOException {
    final JLanguageTool langTool = new JLanguageTool(new AmericanEnglish());
    final SpellingCheckRule rule = new MorfologikAmericanSpellerRule(TestTools.getEnglishMessages(), new AmericanEnglish());
    langTool.addRule(rule);
    final List<RuleMatch> matches = langTool.check("This is a typoh.");
    assertEquals(1, matches.size());
    assertEquals(MorfologikAmericanSpellerRule.RULE_ID, matches.get(0).getRule().getId());
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.