Class ADSentenceSampleStream

java.lang.Object
opennlp.tools.formats.ad.ADSentenceSampleStream
All Implemented Interfaces:
AutoCloseable, opennlp.tools.util.ObjectStream<opennlp.tools.sentdetect.SentenceSample>

@Internal public class ADSentenceSampleStream extends Object implements opennlp.tools.util.ObjectStream<opennlp.tools.sentdetect.SentenceSample>
Note: Do not use this class, internal use only!
  • Constructor Details

    • ADSentenceSampleStream

      public ADSentenceSampleStream(opennlp.tools.util.ObjectStream<String> lineStream, boolean includeHeadlines)
      Initializes a new ADSentenceSampleStream from a opennlp.tools.util.ObjectStream<String>, that could be a PlainTextByLineStream object.
      Parameters:
      lineStream - A stream of lines as String.
      includeHeadlines - If true will output the sentences marked as news headlines.
    • ADSentenceSampleStream

      public ADSentenceSampleStream(opennlp.tools.util.InputStreamFactory in, String charsetName, boolean includeHeadlines) throws IOException
      Initializes a new ADSentenceSampleStream.
      Parameters:
      in - The InputStreamFactory for the corpus.
      charsetName - The charset to use for reading of the corpus.
      includeHeadlines - If true will output the sentences marked as news headlines.
      Throws:
      IOException - Thrown if IO errors occurred.
  • Method Details