SentenceModel model = new SentenceModel(modelStream);
SentenceDetector detector = //<co id="openSentDetect.co.detect"/>
new SentenceDetectorME(model);
String testString = "This is a sentence. It has fruits, vegetables," +
" etc. but does not have meat. Mr. Smith went to Washington.";
String[] result = detector.sentDetect(testString); //<co id="openSentDetect.co.run"/>
for (int i = 0; i < result.length; i++) {
System.out.println("Sentence: " + result[i]);
}
/*<calloutlist>
<callout arearefs="openSentDetect.co.detect"><para>Create the <command>SentenceDetector</command> with the en-sent.bin model</para></callout>