Package cc.mallet.fst

Class TransducerEvaluator

    • Field Detail

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

        tt - The TransducerTrainer to evaluate.
      • 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)