cc.mallet.fst
Class MultiSegmentationEvaluator
java.lang.Object
cc.mallet.fst.TransducerEvaluator
cc.mallet.fst.MultiSegmentationEvaluator
public class MultiSegmentationEvaluator
- extends TransducerEvaluator
Evaluates a transducer model, computes the precision, recall and F1 scores;
considers segments that span across multiple tokens.
Constructor Summary |
MultiSegmentationEvaluator(InstanceList[] instanceLists,
java.lang.String[] instanceListDescriptions,
java.lang.Object[] segmentStartTags,
java.lang.Object[] segmentContinueTags)
|
MultiSegmentationEvaluator(InstanceList instanceList1,
java.lang.String description1,
InstanceList instanceList2,
java.lang.String description2,
InstanceList instanceList3,
java.lang.String description3,
java.lang.Object[] segmentStartTags,
java.lang.Object[] segmentContinueTags)
|
MultiSegmentationEvaluator(InstanceList instanceList1,
java.lang.String description1,
InstanceList instanceList2,
java.lang.String description2,
java.lang.Object[] segmentStartTags,
java.lang.Object[] segmentContinueTags)
|
MultiSegmentationEvaluator(InstanceList instanceList1,
java.lang.String description1,
java.lang.Object[] segmentStartTags,
java.lang.Object[] segmentContinueTags)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MultiSegmentationEvaluator
public MultiSegmentationEvaluator(InstanceList[] instanceLists,
java.lang.String[] instanceListDescriptions,
java.lang.Object[] segmentStartTags,
java.lang.Object[] segmentContinueTags)
MultiSegmentationEvaluator
public MultiSegmentationEvaluator(InstanceList instanceList1,
java.lang.String description1,
java.lang.Object[] segmentStartTags,
java.lang.Object[] segmentContinueTags)
MultiSegmentationEvaluator
public MultiSegmentationEvaluator(InstanceList instanceList1,
java.lang.String description1,
InstanceList instanceList2,
java.lang.String description2,
java.lang.Object[] segmentStartTags,
java.lang.Object[] segmentContinueTags)
MultiSegmentationEvaluator
public MultiSegmentationEvaluator(InstanceList instanceList1,
java.lang.String description1,
InstanceList instanceList2,
java.lang.String description2,
InstanceList instanceList3,
java.lang.String description3,
java.lang.Object[] segmentStartTags,
java.lang.Object[] segmentContinueTags)
evaluateInstanceList
public void evaluateInstanceList(TransducerTrainer tt,
InstanceList data,
java.lang.String description)
- Specified by:
evaluateInstanceList
in class TransducerEvaluator
numIncorrectSegments
public int numIncorrectSegments(Sequence trueOutput,
Sequence predOutput)
- Returns the number of incorrect segments in
predOutput
- Parameters:
trueOutput
- truthpredOutput
- predicted
- Returns:
- number of incorrect segments
batchTest
public void batchTest(InstanceList data,
java.util.List<Sequence> predictedSequences,
java.lang.String description,
java.io.PrintStream viterbiOutputStream)
- Tests segmentation using an ArrayList of predicted Sequences instead of a
Transducer
. If predictedSequence is null, don't include in stats
(useful for error analysis).
- Parameters:
data
- list of instances to be segmentedpredictedSequences
- predictionsdescription
- description of trialviterbiOutputStream
- where to print the Viterbi paths