Examples of BritishEnglish


Examples of org.languagetool.language.BritishEnglish

public class JLanguageToolTest extends TestCase {

  // used on http://languagetool.org/java-api/
  public void demoCodeForHomepage() throws IOException {
    JLanguageTool langTool = new JLanguageTool(new BritishEnglish());
    langTool.activateDefaultPatternRules();
    List<RuleMatch> matches = langTool.check("A sentence " +
        "with a error in the Hitchhiker's Guide tot he Galaxy");
    for (RuleMatch match : matches) {
      System.out.println("Potential error at line " +
View Full Code Here

Examples of org.languagetool.language.BritishEnglish

    }
  }

  // used on http://languagetool.org/java-spell-checker/
  public void spellCheckerDemoCodeForHomepage() throws IOException {
    JLanguageTool langTool = new JLanguageTool(new BritishEnglish());
    for (Rule rule : langTool.getAllRules()) {
      if (!rule.isDictionaryBasedSpellingRule()) {
        langTool.disableRule(rule.getId());
      }
    }
View Full Code Here

Examples of org.languagetool.language.BritishEnglish

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

Examples of org.languagetool.language.BritishEnglish

    super.testNonVariantSpecificSuggestions(rule, language);
  }
 
  @Test
  public void testMorfologikSpeller() throws IOException {
    final BritishEnglish language = new BritishEnglish();
    final MorfologikBritishSpellerRule rule =
            new MorfologikBritishSpellerRule(TestTools.getMessages("en"), language);

    final JLanguageTool langTool = new JLanguageTool(language);
View Full Code Here

Examples of org.languagetool.language.BritishEnglish

  @Override
  protected void setUp() throws Exception {
    super.setUp();
    rule = new BritishReplaceRule(TestTools.getMessages("en"));
    langTool = new JLanguageTool(new BritishEnglish());
  }
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.