cc.mallet.fst
Class ViterbiWriter

java.lang.Object
  extended by cc.mallet.fst.TransducerEvaluator
      extended by cc.mallet.fst.ViterbiWriter

public class ViterbiWriter
extends TransducerEvaluator

Prints the input instances along with the features and the true and predicted labels to a file.

To control the number of times output has to be printed, override the cc.mallet.fst.TransducerTrainer.precondition method.

The name of the output file is filename_prefix + description + iteration_number + '.viterbi'.


Field Summary
 
Fields inherited from class cc.mallet.fst.TransducerEvaluator
instanceListDescriptions, instanceLists
 
Constructor Summary
ViterbiWriter(java.lang.String filenamePrefix, InstanceList[] instanceLists, java.lang.String[] descriptions)
           
ViterbiWriter(java.lang.String filenamePrefix, InstanceList instanceList1, java.lang.String description1)
           
ViterbiWriter(java.lang.String filenamePrefix, InstanceList instanceList1, java.lang.String description1, InstanceList instanceList2, java.lang.String description2)
           
ViterbiWriter(java.lang.String filenamePrefix, InstanceList instanceList1, java.lang.String description1, InstanceList instanceList2, java.lang.String description2, InstanceList instanceList3, java.lang.String description3)
           
 
Method Summary
 void evaluateInstanceList(TransducerTrainer transducerTrainer, 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

ViterbiWriter

public ViterbiWriter(java.lang.String filenamePrefix,
                     InstanceList[] instanceLists,
                     java.lang.String[] descriptions)

ViterbiWriter

public ViterbiWriter(java.lang.String filenamePrefix,
                     InstanceList instanceList1,
                     java.lang.String description1)

ViterbiWriter

public ViterbiWriter(java.lang.String filenamePrefix,
                     InstanceList instanceList1,
                     java.lang.String description1,
                     InstanceList instanceList2,
                     java.lang.String description2)

ViterbiWriter

public ViterbiWriter(java.lang.String filenamePrefix,
                     InstanceList instanceList1,
                     java.lang.String description1,
                     InstanceList instanceList2,
                     java.lang.String description2,
                     InstanceList instanceList3,
                     java.lang.String description3)
Method Detail

preamble

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

evaluateInstanceList

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