SentimentSampleStream (Apache OpenNLP :: Core :: Runtime 3.0.0-M4 API)
Description: declaration: package: opennlp.tools.sentiment, class: SentimentSampleStream

Package opennlp.tools.sentiment

# 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 Summary

  Constructors
  Constructor
  Description
  `SentimentSampleStream(opennlp.tools.util.ObjectStream<String> samples)`
  Instantiates a `SentimentSampleStream` object.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `opennlp.tools.sentiment.SentimentSample`
  `read()`
  Reads the text.

  ### Methods inherited from class opennlp.tools.util.FilterObjectStream

  `close, reset`

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## 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`