Package opennlp.tools.sentiment
Class SentimentCrossValidator.SentimentToDocumentSampleStream
java.lang.Object
opennlp.tools.util.FilterObjectStream<SentimentSample,SentimentCrossValidator.DocumentSample>
opennlp.tools.sentiment.SentimentCrossValidator.SentimentToDocumentSampleStream
- All Implemented Interfaces:
AutoCloseable,ObjectStream<SentimentCrossValidator.DocumentSample>
- Enclosing class:
SentimentCrossValidator
private static class SentimentCrossValidator.SentimentToDocumentSampleStream
extends FilterObjectStream<SentimentSample,SentimentCrossValidator.DocumentSample>
Reads Sentiment Samples to group them as a document based on the clear
adaptive data flag.
-
Field Summary
FieldsFields inherited from class opennlp.tools.util.FilterObjectStream
samples -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstructor -
Method Summary
Methods inherited from class opennlp.tools.util.FilterObjectStream
close
-
Field Details
-
beginSample
-
-
Constructor Details
-
SentimentToDocumentSampleStream
Constructor
-
-
Method Details
-
read
Reads Sentiment Samples to group them as a document- Returns:
- the resulting DocumentSample
- Throws:
IOException- Thrown if there is an error during reading.
-
reset
Performs a reset- Specified by:
resetin interfaceObjectStream<SentimentCrossValidator.DocumentSample>- Overrides:
resetin classFilterObjectStream<SentimentSample,SentimentCrossValidator.DocumentSample> - Throws:
IOException- Thrown if there is an error during resetting the stream.UnsupportedOperationException- Thrown if thereset()is not supported. By default, this is the case.
-