Assert.assertEquals(4, tool.getSentenceCount());
}
@Test
public void testTextAnalysis() throws IOException {
JLanguageTool tool = new MultiThreadedJLanguageTool(new Demo());
List<AnalyzedSentence> analyzedSentences = tool.analyzeText("This is a sentence. And another one.");
assertThat(analyzedSentences.size(), is(2));
assertThat(analyzedSentences.get(0).getTokens().length, is(10));
assertThat(analyzedSentences.get(0).getTokensWithoutWhitespace().length, is(6)); // sentence start has its own token
assertThat(analyzedSentences.get(1).getTokens().length, is(7));