Class POSEvaluator
java.lang.Object
opennlp.tools.util.eval.Evaluator<opennlp.tools.postag.POSSample>
opennlp.tools.postag.POSEvaluator
The
POSEvaluator measures the performance of the given POSTagger
with the provided reference samples.-
Constructor Summary
ConstructorsConstructorDescriptionPOSEvaluator(opennlp.tools.postag.POSTagger tagger, opennlp.tools.postag.POSTaggerEvaluationMonitor... listeners) Initializes the current instance. -
Method Summary
Methods inherited from class Evaluator
evaluate, evaluateSample
-
Constructor Details
-
POSEvaluator
public POSEvaluator(opennlp.tools.postag.POSTagger tagger, opennlp.tools.postag.POSTaggerEvaluationMonitor... listeners) Initializes the current instance.- Parameters:
tagger- ThePOSTaggerto evaluate.listeners- theevaluation listeners.
-
-
Method Details
-
getWordAccuracy
public double getWordAccuracy()Accuracy defined as:word accuracy = correctly detected tags / total words- Returns:
- Retrieves the mean word accuracy.
-
getWordCount
public long getWordCount()- Returns:
- Retrieves the total number of words considered in the evaluation.
-
toString
-