cc.mallet.fst.confidence
Class TransducerConfidenceEstimator

java.lang.Object
  extended by 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 a Segment extracted by a Transducer.

See Also:
Serialized Form

Field Summary
protected  Transducer model
           
 
Constructor Summary
TransducerConfidenceEstimator(Transducer model)
           
 
Method Summary
 double estimateConfidenceFor(Segment segment)
          Calculates the confidence in the tagging of a Segment.
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 all Segments in this InstanceList by confidence estimate.
 Segment[] rankSegmentsByConfidence(Instance instance, java.lang.Object[] startTags, java.lang.Object[] continueTags)
          ranks the segments in one Instance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 a Segment.


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 all Segments in this InstanceList by confidence estimate.

Parameters:
ilist - list of segmentation instances
startTags - represent the labels for the start states (B-) of all segments
continueTags - represent the labels for the continue state (I-) of all segments
Returns:
array of Segments ordered by non-decreasing confidence scores, as calculated by estimateConfidenceFor

rankSegmentsByConfidence

public Segment[] rankSegmentsByConfidence(Instance instance,
                                          java.lang.Object[] startTags,
                                          java.lang.Object[] continueTags)
ranks the segments in one Instance

Parameters:
instance - instances to be segmented
startTags - represent the labels for the start states (e.g. B-) of all segments
continueTags - 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 by estimateConfidenceFor

getTransducer

public Transducer getTransducer()