Class SentimentSampleStream

java.lang.Object
opennlp.tools.util.FilterObjectStream<String, opennlp.tools.sentiment.SentimentSample>
opennlp.tools.sentiment.SentimentSampleStream
All Implemented Interfaces:
AutoCloseable, opennlp.tools.util.ObjectStream<opennlp.tools.sentiment.SentimentSample>

public class SentimentSampleStream extends FilterObjectStream<String, opennlp.tools.sentiment.SentimentSample>
Class for converting Strings through Data Stream to SentimentSample using tokenised text.
  • Constructor Details

    • SentimentSampleStream

      public SentimentSampleStream(opennlp.tools.util.ObjectStream<String> samples)
      Instantiates a SentimentSampleStream object.
      Parameters:
      samples - the sentiment samples to be used
  • Method Details

    • read

      public opennlp.tools.sentiment.SentimentSample read() throws IOException
      Reads the text.
      Returns:
      A ready-to-be-trained SentimentSample object.
      Throws:
      IOException