- Direct Known Subclasses:
- CRFTrainerByEntropyRegularization, CRFTrainerByGE, CRFTrainerByLabelLikelihood, CRFTrainerByLikelihoodAndGE, CRFTrainerByPR, CRFTrainerByThreadedLabelLikelihood, CRFTrainerByValueGradients, HMMTrainerByLikelihood, MEMMTrainer, NoopTransducerTrainer, ShallowTransducerTrainer, TransducerTrainer.ByIncrements
public abstract class TransducerTrainer
- extends java.lang.Object
An abstract class to train and evaluate a transducer model.
|Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public abstract Transducer getTransducer()
public abstract int getIteration()
public abstract boolean isFinishedTraining()
public boolean train(InstanceList trainingSet)
public abstract boolean train(InstanceList trainingSet,
- Train the transducer associated with this TransducerTrainer.
You should be able to call this method with different trainingSet objects.
Whether this causes the TransducerTrainer to combine both trainingSets or
to view the second as a new alternative is at the discretion of the particular
TransducerTrainer subclass involved.
public TransducerTrainer addEvaluator(TransducerEvaluator te)
public TransducerTrainer addEvaluators(java.util.Collection<TransducerEvaluator> tes)
public TransducerTrainer removeEvaluator(TransducerEvaluator te)
protected void runEvaluators()
- This method should be called by subclasses whenever evaluators should be run.
Do not worry too much about them being run too often, because the evaluators
themselves can control/limit when they actually do their work with TransducerEvaluator.precondition().