Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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.

Field Summary
`protected java.lang.String[]` | `instanceListDescriptions`
`protected InstanceList[]` | `instanceLists`

Constructor Summary
`TransducerEvaluator()`
`TransducerEvaluator(InstanceList[] instanceLists, java.lang.String[] instanceListDescriptions)`

Method Summary
`void` | `evaluate(TransducerTrainer tt)` Evaluates a TransducerTrainer and its Transducer on the instance lists specified in the constructor.
`abstract void` | `evaluateInstanceList(TransducerTrainer transducer, InstanceList instances, java.lang.String description)`
`protected void` | `preamble(TransducerTrainer tt)`
`boolean` | `precondition(TransducerTrainer tt)` If this returns false, then the body of the evaluate(TransducerTrainer) method will not run.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### instanceLists

    protected InstanceList[] instanceLists

### instanceListDescriptions

    protected java.lang.String[] instanceListDescriptions

Constructor Detail

### TransducerEvaluator

    public TransducerEvaluator()

### TransducerEvaluator

    public TransducerEvaluator(InstanceList[] instanceLists,
                               java.lang.String[] instanceListDescriptions)

Method Detail

### 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)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD