Package cc.mallet.fst
Class ViterbiWriter
- java.lang.Object
-
- cc.mallet.fst.TransducerEvaluator
-
- 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
Constructors Constructor Description 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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
-
-
-
-
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 classTransducerEvaluator
-
evaluateInstanceList
public void evaluateInstanceList(TransducerTrainer transducerTrainer, InstanceList instances, java.lang.String description)
- Specified by:
evaluateInstanceList
in classTransducerEvaluator
-
-