Package cc.mallet.fst.confidence
Class TransducerConfidenceEstimator
- java.lang.Object
-
- cc.mallet.fst.confidence.TransducerConfidenceEstimator
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
ConstrainedForwardBackwardConfidenceEstimator
,GammaAverageConfidenceEstimator
,GammaProductConfidenceEstimator
,MaxEntConfidenceEstimator
,RandomConfidenceEstimator
public abstract class TransducerConfidenceEstimator extends java.lang.Object implements java.io.Serializable
Abstract class that estimates the confidence of aSegment
extracted by aTransducer
.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Transducer
model
-
Constructor Summary
Constructors Constructor Description TransducerConfidenceEstimator(Transducer model)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description double
estimateConfidenceFor(Segment segment)
Calculates the confidence in the tagging of aSegment
.abstract double
estimateConfidenceFor(Segment segment, SumLatticeDefault lattice)
java.util.Vector
getSegmentConfidences()
Transducer
getTransducer()
Segment[]
rankSegmentsByConfidence(InstanceList ilist, java.lang.Object[] startTags, java.lang.Object[] continueTags)
Ranks allSegment
s in thisInstanceList
by confidence estimate.Segment[]
rankSegmentsByConfidence(Instance instance, java.lang.Object[] startTags, java.lang.Object[] continueTags)
ranks the segments in oneInstance
-
-
-
Field Detail
-
model
protected Transducer model
-
-
Constructor Detail
-
TransducerConfidenceEstimator
public TransducerConfidenceEstimator(Transducer model)
-
-
Method Detail
-
estimateConfidenceFor
public double estimateConfidenceFor(Segment segment)
Calculates the confidence in the tagging of aSegment
.
-
estimateConfidenceFor
public abstract double estimateConfidenceFor(Segment segment, SumLatticeDefault lattice)
-
getSegmentConfidences
public java.util.Vector getSegmentConfidences()
-
rankSegmentsByConfidence
public Segment[] rankSegmentsByConfidence(InstanceList ilist, java.lang.Object[] startTags, java.lang.Object[] continueTags)
Ranks allSegment
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
Segment
s ordered by non-decreasing confidence scores, as calculated byestimateConfidenceFor
-
rankSegmentsByConfidence
public Segment[] rankSegmentsByConfidence(Instance instance, java.lang.Object[] startTags, java.lang.Object[] continueTags)
ranks the segments in oneInstance
- Parameters:
instance
- instances to be segmentedstartTags
- represent the labels for the start states (e.g. B-) of all segmentscontinueTags
- represent the labels for the continue state (e.g. I-) of all segments- Returns:
- array of
Segment
s ordered by non-decreasing confidence scores, as calculated byestimateConfidenceFor
-
getTransducer
public Transducer getTransducer()
-
-