List < Sentence > textToSentence ( Reader reader ) throws IOException { List < Sentence > sentence = new ArrayList < Sentence > ( ) ; Sentence sen = null ; sentenceSeg . reset ( reader ) ; while ( ( sen = sentenceSeg . next ( ) ) != null ) { sentence . add ( sen ) ; } return sentence ; }
text doc to sentence