Package opennlp.tools.sentiment
Class SentimentSampleStream
java.lang.Object
opennlp.tools.util.FilterObjectStream<String,SentimentSample>
opennlp.tools.sentiment.SentimentSampleStream
- All Implemented Interfaces:
AutoCloseable,ObjectStream<SentimentSample>
Class for converting Strings through Data Stream to
SentimentSample using
tokenised text.-
Field Summary
Fields inherited from class opennlp.tools.util.FilterObjectStream
samples -
Constructor Summary
ConstructorsConstructorDescriptionSentimentSampleStream(ObjectStream<String> samples) Instantiates aSentimentSampleStreamobject. -
Method Summary
Methods inherited from class opennlp.tools.util.FilterObjectStream
close, reset
-
Constructor Details
-
SentimentSampleStream
Instantiates aSentimentSampleStreamobject.- Parameters:
samples- the sentiment samples to be used
-
-
Method Details
-
read
Reads the text.- Returns:
- A ready-to-be-trained
SentimentSampleobject. - Throws:
IOException- Thrown if there is an error during reading.
-