edu.umass.cs.mallet.base.fst
Class Transducer.ViterbiPath

java.lang.Object
  extended byedu.umass.cs.mallet.base.types.SequencePair
      extended byedu.umass.cs.mallet.base.types.SequencePairAlignment
          extended byedu.umass.cs.mallet.base.fst.Transducer.ViterbiPath
Enclosing class:
Transducer

public class Transducer.ViterbiPath
extends SequencePairAlignment


Field Summary
 
Fields inherited from class edu.umass.cs.mallet.base.types.SequencePairAlignment
cost
 
Fields inherited from class edu.umass.cs.mallet.base.types.SequencePair
confidenceNBest, costNBest, input, output, outputNBest
 
Constructor Summary
protected Transducer.ViterbiPath(Sequence inputSequence, Sequence outputSequence)
           
protected Transducer.ViterbiPath(Sequence inputSequence, Sequence outputSequence, boolean saveLattice)
           
 
Method Summary
 Transducer.State getBestState(int ip)
           
 Sequence getBestStates()
          Returns the maximum-value state sequence from this Lattice.
 double getDelta(int ip, int stateIndex)
           
 Transducer.State getStateAtRank(int ip, int rank)
           
 Transducer getTransducer()
           
protected  edu.umass.cs.mallet.base.fst.Transducer.ViterbiPath.ViterbiNode getViterbiNode(edu.umass.cs.mallet.base.fst.Transducer.ViterbiPath.ViterbiNode[][] nodes, int ip, int stateIndex)
           
 void incrementTransducerCounts()
           
 double tokenAccuracy(Sequence referenceOutput)
           
 double tokenAccuracy(Sequence referenceOutput, java.io.PrintWriter out)
           
 SequencePairAlignment trimStateInfo()
           
 
Methods inherited from class edu.umass.cs.mallet.base.types.SequencePairAlignment
getCost
 
Methods inherited from class edu.umass.cs.mallet.base.types.SequencePair
confidenceNBest, costNBest, input, output, outputNBest
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Transducer.ViterbiPath

protected Transducer.ViterbiPath(Sequence inputSequence,
                                 Sequence outputSequence)

Transducer.ViterbiPath

protected Transducer.ViterbiPath(Sequence inputSequence,
                                 Sequence outputSequence,
                                 boolean saveLattice)
Method Detail

getDelta

public double getDelta(int ip,
                       int stateIndex)

getBestState

public Transducer.State getBestState(int ip)

getStateAtRank

public Transducer.State getStateAtRank(int ip,
                                       int rank)

getViterbiNode

protected edu.umass.cs.mallet.base.fst.Transducer.ViterbiPath.ViterbiNode getViterbiNode(edu.umass.cs.mallet.base.fst.Transducer.ViterbiPath.ViterbiNode[][] nodes,
                                                                                         int ip,
                                                                                         int stateIndex)

incrementTransducerCounts

public void incrementTransducerCounts()

trimStateInfo

public SequencePairAlignment trimStateInfo()

tokenAccuracy

public double tokenAccuracy(Sequence referenceOutput)

tokenAccuracy

public double tokenAccuracy(Sequence referenceOutput,
                            java.io.PrintWriter out)

getTransducer

public Transducer getTransducer()

getBestStates

public Sequence getBestStates()
Returns the maximum-value state sequence from this Lattice. This is distinct from SequencePair.output(), which returns the Transducer's output from the most likely state sequence.

Almost all applications will want to use the output method instead. An exception are debugging tools that care specifically about the state sequence.

Returns:
A Sequence of Strings. Its length will be the input length plus 1. (for start state).