Ejemplo n.º 1
0
 @Test
 public void testSentDetect() {
   // openNLP.createSentenceDetector(OpenNLP.DEFAUL_SENT_MODEL);
   String sampleSentences1 = "This is a test. There are many tests, this is the second.";
   String[] sents = openNLP.sentDetect(sampleSentences1);
   assertEquals(sents.length, 2);
   assertEquals(sents[0], "This is a test.");
   assertEquals(sents[1], "There are many tests, this is the second.");
 }