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

java.lang.Object
  extended byedu.umass.cs.mallet.base.fst.Transducer.BeamLattice
Enclosing class:
Transducer

public class Transducer.BeamLattice
extends java.lang.Object


Constructor Summary
protected Transducer.BeamLattice(Sequence input, Sequence output, boolean increment)
           
protected Transducer.BeamLattice(Sequence input, Sequence output, boolean increment, boolean saveXis)
           
protected Transducer.BeamLattice(Sequence input, Sequence output, boolean increment, boolean saveXis, LabelAlphabet outputAlphabet)
           
protected Transducer.BeamLattice(Sequence input, Sequence output, boolean increment, LabelAlphabet outputAlphabet, int[] constraints)
          Create a lattice that constrains its transitions such that the pairs in "constraints" are adhered to.
 
Method Summary
 double getAlpha(int ip, Transducer.State s)
           
 double getBeta(int ip, Transducer.State s)
           
 double getCost()
           
 double getGammaCost(int inputPosition, Transducer.State s)
           
 double getGammaProbability(int inputPosition, Transducer.State s)
           
 LabelVector getLabelingAtPosition(int outputPosition)
           
 Transducer getTransducer()
           
 double getXiCost(int ip, Transducer.State s1, Transducer.State s2)
           
 double getXiProbability(int ip, Transducer.State s1, Transducer.State s2)
           
 int length()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Transducer.BeamLattice

protected Transducer.BeamLattice(Sequence input,
                                 Sequence output,
                                 boolean increment)

Transducer.BeamLattice

protected Transducer.BeamLattice(Sequence input,
                                 Sequence output,
                                 boolean increment,
                                 boolean saveXis)

Transducer.BeamLattice

protected Transducer.BeamLattice(Sequence input,
                                 Sequence output,
                                 boolean increment,
                                 boolean saveXis,
                                 LabelAlphabet outputAlphabet)

Transducer.BeamLattice

protected Transducer.BeamLattice(Sequence input,
                                 Sequence output,
                                 boolean increment,
                                 LabelAlphabet outputAlphabet,
                                 int[] constraints)
Create a lattice that constrains its transitions such that the pairs in "constraints" are adhered to. constraints is an array where each entry is the index of the required label at that position. An entry of 0 means there are no constraints on that . Positive values mean the path must pass through that state. Negative values mean the path must _not_ pass through that state. NOTE - constraints.length must be equal to output.size() + 1. A lattice has one extra position for the initial state. Generally, this should be unconstrained, since it does not produce an observation.

Method Detail

getCost

public double getCost()

getGammaCost

public double getGammaCost(int inputPosition,
                           Transducer.State s)

getGammaProbability

public double getGammaProbability(int inputPosition,
                                  Transducer.State s)

getXiProbability

public double getXiProbability(int ip,
                               Transducer.State s1,
                               Transducer.State s2)

getXiCost

public double getXiCost(int ip,
                        Transducer.State s1,
                        Transducer.State s2)

length

public int length()

getAlpha

public double getAlpha(int ip,
                       Transducer.State s)

getBeta

public double getBeta(int ip,
                      Transducer.State s)

getLabelingAtPosition

public LabelVector getLabelingAtPosition(int outputPosition)

getTransducer

public Transducer getTransducer()