Class SentenceSampleStream

java.lang.Object
opennlp.tools.util.FilterObjectStream<String, opennlp.tools.sentdetect.SentenceSample>
opennlp.tools.sentdetect.SentenceSampleStream
All Implemented Interfaces:
AutoCloseable, opennlp.tools.util.ObjectStream<opennlp.tools.sentdetect.SentenceSample>

public class SentenceSampleStream extends FilterObjectStream<String, opennlp.tools.sentdetect.SentenceSample>
This class is a stream filter which reads a sentence by line samples from an ObjectStream and converts them into SentenceSample objects. An empty line indicates the beginning of a new document.
  • Constructor Details

    • SentenceSampleStream

      public SentenceSampleStream(opennlp.tools.util.ObjectStream<String> sentences)
  • Method Details

    • replaceNewLineEscapeTags

      public static String replaceNewLineEscapeTags(String s)
    • read

      public opennlp.tools.sentdetect.SentenceSample read() throws IOException
      Throws:
      IOException