opennlp.tools.util.eval
Class Evaluator<T>
java.lang.Object
opennlp.tools.util.eval.Evaluator<T>
- Direct Known Subclasses:
- POSEvaluator, SentenceDetectorEvaluator, TokenizerEvaluator, TokenNameFinderEvaluator
public abstract class Evaluator<T>
- extends Object
The Evaluator
is an abstract base class for evaluators.
Evaluation results are the arithmetic mean of the
scores calculated for each reference sample.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Evaluator
public Evaluator()
evaluateSample
public abstract void evaluateSample(T sample)
- Evaluates the given reference object.
The implementation has to update the score after every invocation.
- Parameters:
sample
- the sample to be evaluated
evaluate
public void evaluate(ObjectStream<T> samples)
throws IOException
- Reads all sample objects from the stream
and evaluates each sample object with
evaluateSample(Object)
method.
- Parameters:
samples
- the stream of reference which
should be evaluated.
- Throws:
IOException
Copyright © 2010. All Rights Reserved.