Package org.languagetool.rules

Examples of org.languagetool.rules.WhitespaceRule.match()


public class WhitespaceRuleTest extends TestCase {

    public void testRule() throws IOException {
      final WhitespaceRule rule = new WhitespaceRule(TestTools.getEnglishMessages(), new Polish());
      final JLanguageTool langTool = new JLanguageTool(new Polish());
      assertEquals(0, rule.match(langTool.getAnalyzedSentence("To jest test.")).length);
      assertEquals(1, rule.match(langTool.getAnalyzedSentence("To jest   test.")).length);
    }

}
View Full Code Here


    public void testRule() throws IOException {
      final WhitespaceRule rule = new WhitespaceRule(TestTools.getEnglishMessages(), new Polish());
      final JLanguageTool langTool = new JLanguageTool(new Polish());
      assertEquals(0, rule.match(langTool.getAnalyzedSentence("To jest test.")).length);
      assertEquals(1, rule.match(langTool.getAnalyzedSentence("To jest   test.")).length);
    }

}
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.