mawiesne commented on code in PR #829: URL: https://github.com/apache/opennlp/pull/829#discussion_r2247836935
########## opennlp-core/opennlp-runtime/src/test/java/opennlp/tools/sentdetect/SentenceDetectorMEGermanTest.java: ########## @@ -131,14 +140,41 @@ void testSentDetectWithUseTokenEndFalse() { final String sent1 = "Träume sind eine Verbindung von Gedanken."; final String sent2 = "Verschiedene Gedanken sind während der Traumformation aktiv."; - SentenceDetectorME sentDetect = new SentenceDetectorME(sentdetectModel); //There is no blank space before start of the second sentence. - String[] sents = sentDetect.sentDetect(sent1 + sent2); - double[] probs = sentDetect.probs(); + String[] sents = sentenceDetector.sentDetect(sent1 + sent2); + double[] probs = sentenceDetector.probs(); - assertAll(() -> assertEquals(2, sents.length), + assertAll( + () -> assertEquals(2, sents.length), () -> assertEquals(sent1, sents[0]), () -> assertEquals(sent2, sents[1]), () -> assertEquals(2, probs.length)); } + + /* + * A reproducer and test for OPENNLP-1767. + * It checks that sentence detection with common abbreviations works correctly, + * that is, tokenks such as "lt.", "f.", "S." (page), "ca.", or "ugs." do not cause Review Comment: Thx for the pointer. Will resolve it. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@opennlp.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org