Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## cc.mallet.fst.confidence
Class ConstrainedViterbiTransducerCorrector

    java.lang.Object
      cc.mallet.fst.confidence.ConstrainedViterbiTransducerCorrector

All Implemented Interfaces:
  TransducerCorrector

    public class ConstrainedViterbiTransducerCorrector

extends java.lang.Object
implements TransducerCorrector

Corrects a subset of the `Segment`s produced by a `Transducer`. It's most useful to find the `Segment`s that the `Transducer` is least confident in and correct those using the true `Labeling` (`correctLeastConfidenceSegments`). The corrected segment then propagates to other labelings in the sequence using "constrained viterbi" -- a viterbi calculation that requires the path to pass through the corrected segment states.

Constructor Summary
`ConstrainedViterbiTransducerCorrector(Transducer model)`
`ConstrainedViterbiTransducerCorrector(TransducerConfidenceEstimator confidenceEstimator, Transducer model)`

Method Summary
`java.util.ArrayList` | `correctLeastConfidentSegments(InstanceList ilist, java.lang.Object[] startTags, java.lang.Object[] continueTags)`
`java.util.ArrayList` | `correctLeastConfidentSegments(InstanceList ilist, java.lang.Object[] startTags, java.lang.Object[] continueTags, boolean findIncorrect)` Returns an ArrayList of corrected Sequences.
`java.util.ArrayList` | `getLeastConfidentSegments()` Returns the least confident segments from each sequence in the previous call to `correctLeastConfidentSegments`
`java.util.ArrayList` | `getLeastConfidentSegments(InstanceList ilist, java.lang.Object[] startTags, java.lang.Object[] continueTags)` Returns the least confident segments in `ilist`
`java.util.Vector` | `getSegmentConfidences()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ConstrainedViterbiTransducerCorrector

    public ConstrainedViterbiTransducerCorrector(TransducerConfidenceEstimator confidenceEstimator,
                                                 Transducer model)

### ConstrainedViterbiTransducerCorrector

    public ConstrainedViterbiTransducerCorrector(Transducer model)

Method Detail

### getSegmentConfidences

    public java.util.Vector getSegmentConfidences()

### getLeastConfidentSegments

    public java.util.ArrayList getLeastConfidentSegments()

  Returns the least confident segments from each sequence in the previous call to `correctLeastConfidentSegments`

### getLeastConfidentSegments

    public java.util.ArrayList getLeastConfidentSegments(InstanceList ilist,
                                                         java.lang.Object[] startTags,
                                                         java.lang.Object[] continueTags)

  Returns the least confident segments in `ilist`

  Parameters:
    `ilist` - test instances
    `startTags` - indicate the beginning of segments
    `continueTages` - indicate "inside" of segments
  Returns:
    list of `Segment`s, one for each instance, that is least confident

### correctLeastConfidentSegments

    public java.util.ArrayList correctLeastConfidentSegments(InstanceList ilist,
                                                             java.lang.Object[] startTags,
                                                             java.lang.Object[] continueTags)

  Specified by:
    `correctLeastConfidentSegments` in interface `TransducerCorrector`

### correctLeastConfidentSegments

    public java.util.ArrayList correctLeastConfidentSegments(InstanceList ilist,
                                                             java.lang.Object[] startTags,
                                                             java.lang.Object[] continueTags,
                                                             boolean findIncorrect)

  Returns an ArrayList of corrected Sequences. Also stores leastConfidentSegments, an ArrayList of the segments to correct, where null entries mean no segment was corrected for that sequence.

  Parameters:
    `ilist` - test instances
    `startTags` - indicate the beginning of segments
    `continueTages` - indicate "inside" of segments
    `findIncorrect` - true if we should cycle through least confident segments until find an incorrect one
  Returns:
    list of `Sequence`s corresponding to the corrected tagging of each instance in `ilist`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD