Package cc.mallet.fst.confidence
Class TransducerSequenceConfidenceEstimator
- java.lang.Object
-
- cc.mallet.fst.confidence.TransducerSequenceConfidenceEstimator
-
- Direct Known Subclasses:
MaxEntSequenceConfidenceEstimator
,MinSegmentConfidenceEstimator
,NBestViterbiConfidenceEstimator
,QBCSequenceConfidenceEstimator
,RandomSequenceConfidenceEstimator
,SegmentProductConfidenceEstimator
,ViterbiConfidenceEstimator
,ViterbiRatioConfidenceEstimator
public abstract class TransducerSequenceConfidenceEstimator extends java.lang.Object
Abstract class that estimates the confidence of aSequence
extracted by aTransducer
.Note that this is different fromTransducerConfidenceEstimator
, which estimates the confidence for a singleSegment
.
-
-
Field Summary
Fields Modifier and Type Field Description protected Transducer
model
-
Constructor Summary
Constructors Constructor Description TransducerSequenceConfidenceEstimator(Transducer model)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract double
estimateConfidenceFor(Instance instance, java.lang.Object[] startTags, java.lang.Object[] inTags)
Calculates the confidence in the tagging of aSequence
.InstanceWithConfidence[]
rankInstancesByConfidence(InstanceList ilist, java.lang.Object[] startTags, java.lang.Object[] continueTags)
Ranks allSequences
s in thisInstanceList
by confidence estimate.
-
-
-
Field Detail
-
model
protected Transducer model
-
-
Constructor Detail
-
TransducerSequenceConfidenceEstimator
public TransducerSequenceConfidenceEstimator(Transducer model)
-
-
Method Detail
-
estimateConfidenceFor
public abstract double estimateConfidenceFor(Instance instance, java.lang.Object[] startTags, java.lang.Object[] inTags)
Calculates the confidence in the tagging of aSequence
.
-
rankInstancesByConfidence
public InstanceWithConfidence[] rankInstancesByConfidence(InstanceList ilist, java.lang.Object[] startTags, java.lang.Object[] continueTags)
Ranks allSequences
s in thisInstanceList
by confidence estimate.- Parameters:
ilist
- list of segmentation instancesstartTags
- represent the labels for the start states (B-) of all segmentscontinueTags
- represent the labels for the continue state (I-) of all segments- Returns:
- array of
InstanceWithConfidence
s ordered by non-decreasing confidence scores, as calculated byestimateConfidenceFor
-
-