Package cc.mallet.fst
Class CRFWriter
- java.lang.Object
-
- cc.mallet.fst.TransducerEvaluator
-
- cc.mallet.fst.CRFWriter
-
public class CRFWriter extends TransducerEvaluator
Saves a trained model to specified filename.Can be used to save the model every few iterations, e.g. to save every 5 iterations:
new CRFWriter(filePrefix) { public boolean precondition (TransducerTrainer tt) { return tt.getIteration() % 5 == 0; };
The trained model is saved in the format: filenamePrefix.
.bin. - Author:
- Gaurav Chandalia
-
-
Field Summary
-
Fields inherited from class cc.mallet.fst.TransducerEvaluator
instanceListDescriptions, instanceLists
-
-
Constructor Summary
Constructors Constructor Description CRFWriter(java.lang.String filenamePrefix)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
evaluateInstanceList(TransducerTrainer transducer, InstanceList instances, java.lang.String description)
protected void
preamble(TransducerTrainer tt)
-
Methods inherited from class cc.mallet.fst.TransducerEvaluator
evaluate, precondition
-
-
-
-
Method Detail
-
preamble
protected void preamble(TransducerTrainer tt)
- Overrides:
preamble
in classTransducerEvaluator
-
evaluateInstanceList
public void evaluateInstanceList(TransducerTrainer transducer, InstanceList instances, java.lang.String description)
- Specified by:
evaluateInstanceList
in classTransducerEvaluator
-
-