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.SerializableAbstract class that estimates the confidence of aSegmentextracted by aTransducer.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Transducermodel
-
Constructor Summary
Constructors Constructor Description TransducerConfidenceEstimator(Transducer model)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description doubleestimateConfidenceFor(Segment segment)Calculates the confidence in the tagging of aSegment.abstract doubleestimateConfidenceFor(Segment segment, SumLatticeDefault lattice)java.util.VectorgetSegmentConfidences()TransducergetTransducer()Segment[]rankSegmentsByConfidence(InstanceList ilist, java.lang.Object[] startTags, java.lang.Object[] continueTags)Ranks allSegments in thisInstanceListby 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 allSegments in thisInstanceListby 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
Segments 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
Segments ordered by non-decreasing confidence scores, as calculated byestimateConfidenceFor
-
getTransducer
public Transducer getTransducer()
-
-