Package opennlp.tools.sentiment
Class SentimentEvaluator
The
SentimentEvaluator measures the performance of
the given SentimentME with the provided reference
SentimentSamples.- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSentimentEvaluator(SentimentME sentiment, SentimentEvaluationMonitor... listeners) Initializes the current instance. -
Method Summary
Modifier and TypeMethodDescriptionprotected SentimentSampleprocessSample(SentimentSample reference) Evaluates the given referenceEvaluatorsample object.Methods inherited from class opennlp.tools.util.eval.Evaluator
evaluate, evaluateSample
-
Field Details
-
fmeasure
-
sentiment
-
-
Constructor Details
-
SentimentEvaluator
Initializes the current instance.- Parameters:
sentiment- TheSentimentMEto be used for predicting sentiment.listeners- Theevaluation sample listeners.
-
-
Method Details
-
processSample
Evaluates the given referenceEvaluatorsample object.The implementation has to update the score after every invocation.
- Specified by:
processSamplein classEvaluator<SentimentSample>- Parameters:
reference- Areference sample.- Returns:
- The predicted
sample.
-
getFMeasure
-