cc.mallet.fst.confidence
Class MaxEntSequenceConfidenceEstimator
java.lang.Object
cc.mallet.fst.confidence.TransducerSequenceConfidenceEstimator
cc.mallet.fst.confidence.MaxEntSequenceConfidenceEstimator
public class MaxEntSequenceConfidenceEstimator
- extends TransducerSequenceConfidenceEstimator
Estimates the confidence of a Sequence
extracted by a Transducer
using a MaxEnt
classifier to classify Sequences
as "correct" or "incorrect." xxx needs some interface work.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MaxEntSequenceConfidenceEstimator
public MaxEntSequenceConfidenceEstimator(Transducer model,
double gaussianVariance)
MaxEntSequenceConfidenceEstimator
public MaxEntSequenceConfidenceEstimator(Transducer model)
getClassifier
public MaxEnt getClassifier()
trainClassifier
public MaxEnt trainClassifier(InstanceList ilist,
java.lang.String correct,
java.lang.String incorrect)
- Train underlying classifier on
ilist
. Assumes ilist
has targst correct
or incorrect
.
- Parameters:
ilist
- training list to build correct/incorrect classifiercorrect
- "correct" labelincorrect
- "incorrect" label
estimateConfidenceFor
public double estimateConfidenceFor(Instance instance,
java.lang.Object[] startTags,
java.lang.Object[] inTags)
- Calculates the confidence in the tagging of an
Instance
.
- Specified by:
estimateConfidenceFor
in class TransducerSequenceConfidenceEstimator
rankPipedInstancesByConfidence
public PipedInstanceWithConfidence[] rankPipedInstancesByConfidence(InstanceList ilist,
java.lang.Object[] startTags,
java.lang.Object[] continueTags)