Package org.languagetool.rules

Examples of org.languagetool.rules.Rule


    final SearcherResult searcherResult = errorSearcher.findRuleMatchesOnIndex(rule1, new English());
    assertEquals(1, searcherResult.getCheckedSentences());
    assertEquals(1, searcherResult.getMatchingSentences().size());
    final List<RuleMatch> ruleMatches = searcherResult.getMatchingSentences().get(0).getRuleMatches();
    assertEquals(1, ruleMatches.size());
    final Rule rule = ruleMatches.get(0).getRule();
    assertEquals("RULE1", rule.getId());
  }
View Full Code Here


    final SearcherResult searcherResult = errorSearcher.findRuleMatchesOnIndex(rule1, new English());
    assertEquals(1, searcherResult.getCheckedSentences());
    assertEquals(1, searcherResult.getMatchingSentences().size());
    final List<RuleMatch> ruleMatches = searcherResult.getMatchingSentences().get(0).getRuleMatches();
    assertEquals(1, ruleMatches.size());
    final Rule rule = ruleMatches.get(0).getRule();
    assertEquals("RULE1", rule.getId());
  }
View Full Code Here

    final SearcherResult searcherResult1 = errorSearcher.findRuleMatchesOnIndex(rule1, new English());
    assertEquals(1, searcherResult1.getMatchingSentences().size());
    final List<RuleMatch> ruleMatches = searcherResult1.getMatchingSentences().get(0).getRuleMatches();
    assertEquals(1, ruleMatches.size());
    final Rule rule = ruleMatches.get(0).getRule();
    assertEquals("RULE1", rule.getId());

    final SearcherResult searcherResult2 = errorSearcher.findRuleMatchesOnIndex(rule2, new English());
    assertEquals(0, searcherResult2.getMatchingSentences().size());
  }
View Full Code Here

    final SearcherResult searcherResult = errorSearcher.findRuleMatchesOnIndex(rule1, new English());
    assertEquals(1, searcherResult.getCheckedSentences());
    assertEquals(1, searcherResult.getMatchingSentences().size());
    final List<RuleMatch> ruleMatches = searcherResult.getMatchingSentences().get(0).getRuleMatches();
    assertEquals(1, ruleMatches.size());
    final Rule rule = ruleMatches.get(0).getRule();
    assertEquals("RULE1", rule.getId());
  }
View Full Code Here

    final SearcherResult searcherResult = errorSearcher.findRuleMatchesOnIndex(rule1, new English());
    assertEquals(1, searcherResult.getCheckedSentences());
    assertEquals(1, searcherResult.getMatchingSentences().size());
    final List<RuleMatch> ruleMatches = searcherResult.getMatchingSentences().get(0).getRuleMatches();
    assertEquals(1, ruleMatches.size());
    final Rule rule = ruleMatches.get(0).getRule();
    assertEquals("RULE1", rule.getId());
  }
View Full Code Here

public class MorfologikSouthAfricanSpellerRuleTest extends AbstractEnglishSpellerRuleTest {

  @Test
  public void testSuggestions() throws IOException {
    Language language = new SouthAfricanEnglish();
    Rule rule = new MorfologikSouthAfricanSpellerRule(TestTools.getMessages("en"), language);
    super.testNonVariantSpecificSuggestions(rule, language);
  }
View Full Code Here

public class MorfologikAustralianSpellerRuleTest extends AbstractEnglishSpellerRuleTest {

  @Test
  public void testSuggestions() throws IOException {
    Language language = new AustralianEnglish();
    Rule rule = new MorfologikAustralianSpellerRule(TestTools.getMessages("en"), language);
    super.testNonVariantSpecificSuggestions(rule, language);
  }
View Full Code Here

public class MorfologikBritishSpellerRuleTest extends AbstractEnglishSpellerRuleTest {

  @Test
  public void testSuggestions() throws IOException {
    Language language = new BritishEnglish();
    Rule rule = new MorfologikBritishSpellerRule(TestTools.getMessages("en"), language);
    super.testNonVariantSpecificSuggestions(rule, language);
  }
View Full Code Here

  }

  @Test
  public void testSuggestions() throws IOException {
    Language language = new AmericanEnglish();
    Rule rule = new MorfologikAmericanSpellerRule(TestTools.getMessages("en"), language);
    super.testNonVariantSpecificSuggestions(rule, language);
  }
View Full Code Here

public class MorfologikCanadianSpellerRuleTest extends AbstractEnglishSpellerRuleTest{

  @Test
  public void testSuggestions() throws IOException {
    Language language = new CanadianEnglish();
    Rule rule = new MorfologikCanadianSpellerRule(TestTools.getMessages("en"), language);
    super.testNonVariantSpecificSuggestions(rule, language);
  }
View Full Code Here

TOP

Related Classes of org.languagetool.rules.Rule

Copyright © 2018 www.massapicom. 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.