cc.mallet.fst
Class CRFWriter

java.lang.Object
  extended by cc.mallet.fst.TransducerEvaluator
      extended by 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
CRFWriter(java.lang.String filenamePrefix)
           
 
Method Summary
 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CRFWriter

public CRFWriter(java.lang.String filenamePrefix)
Method Detail

preamble

protected void preamble(TransducerTrainer tt)
Overrides:
preamble in class TransducerEvaluator

evaluateInstanceList

public void evaluateInstanceList(TransducerTrainer transducer,
                                 InstanceList instances,
                                 java.lang.String description)
Specified by:
evaluateInstanceList in class TransducerEvaluator