cc.mallet.fst
Class TransducerEvaluator
java.lang.Object
cc.mallet.fst.TransducerEvaluator
- Direct Known Subclasses:
- CRFWriter, InstanceAccuracyEvaluator, LabelDistributionEvaluator, MultiSegmentationEvaluator, PerClassAccuracyEvaluator, SegmentationEvaluator, TokenAccuracyEvaluator, ViterbiWriter
public abstract class TransducerEvaluator
- extends java.lang.Object
An abstract class to evaluate a transducer model.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
instanceLists
protected InstanceList[] instanceLists
instanceListDescriptions
protected java.lang.String[] instanceListDescriptions
TransducerEvaluator
public TransducerEvaluator()
TransducerEvaluator
public TransducerEvaluator(InstanceList[] instanceLists,
java.lang.String[] instanceListDescriptions)
evaluate
public void evaluate(TransducerTrainer tt)
- Evaluates a TransducerTrainer and its Transducer on the instance lists specified in the constructor. .
The default implementation calls the evaluator's evaluateInstanceList on each instance list.
- Parameters:
tt
- The TransducerTrainer to evaluate.
preamble
protected void preamble(TransducerTrainer tt)
precondition
public boolean precondition(TransducerTrainer tt)
- If this returns false, then the body of the evaluate(TransducerTrainer) method will not run.
Use this method to implement behaviors such as only evaluating every 5 iterations with
new TokenAccuracyEvaluator (crft) { public boolean precondition (TransducerTrainer tt) { return tt.getIteration() % 5 == 0; };
evaluateInstanceList
public abstract void evaluateInstanceList(TransducerTrainer transducer,
InstanceList instances,
java.lang.String description)