public class POSEvaluator extends Evaluator<POSSample>
POSEvaluator
measures the performance of
the given POSTagger
with the provided reference
POSSample
s.Constructor and Description |
---|
POSEvaluator(POSTagger tagger,
POSTaggerEvaluationMonitor... listeners)
Initializes the current instance.
|
Modifier and Type | Method and Description |
---|---|
double |
getWordAccuracy()
Retrieves the word accuracy.
|
long |
getWordCount()
Retrieves the total number of words considered
in the evaluation.
|
protected POSSample |
processSample(POSSample reference)
Evaluates the given reference
POSSample object. |
String |
toString()
Represents this objects as human readable
String . |
evaluate, evaluateSample
public POSEvaluator(POSTagger tagger, POSTaggerEvaluationMonitor... listeners)
tagger
- listeners
- an array of evaluation listenersprotected POSSample processSample(POSSample reference)
POSSample
object.
This is done by tagging the sentence from the reference
POSSample
with the POSTagger
. The
tags are then used to update the word accuracy score.processSample
in class Evaluator<POSSample>
reference
- the reference POSSample
.POSSample
.public double getWordAccuracy()
public long getWordCount()
Copyright © 2015 The Apache Software Foundation. All rights reserved.