Package org.languagetool.language

Examples of org.languagetool.language.English


    assertEquals(1, lt.check("a sentence.").size());
    assertEquals(1, lt.check("a sentence!").size());*/
  }
 
  public void testRule() throws IOException {
    final JLanguageTool lt = new JLanguageTool(new English());
    assertEquals(0, lt.check("In Nov. next year.").size());
  }
View Full Code Here


  private TextLevelRule rule;
  private JLanguageTool langTool;

  @Override
  public void setUp() throws IOException {
    rule = new EnglishUnpairedBracketsRule(TestTools.getEnglishMessages(), new English());
    langTool = new JLanguageTool(new English());
  }
View Full Code Here

    final RuleMatch[] matches = rule.match(Collections.singletonList(langTool.getAnalyzedSentence(sentence)));
    assertEquals(1, matches.length);
  }

  public void testMultipleSentences() throws IOException {
    final JLanguageTool lt = new JLanguageTool(new English());

    assertEquals(0, getMatches("This is multiple sentence text that contains a bracket: "
                             + "[This is bracket. With some text.] and this continues.\n", lt));

    assertEquals(0, getMatches("This is multiple sentence text that contains a bracket. "
View Full Code Here

TOP

Related Classes of org.languagetool.language.English

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.