cc.mallet.fst
Class SumLatticeBeam
java.lang.Object
cc.mallet.fst.SumLatticeBeam
- All Implemented Interfaces:
- SumLattice
public class SumLatticeBeam
- extends java.lang.Object
- implements SumLattice
Constructor Summary |
SumLatticeBeam(Transducer t,
Sequence input,
Sequence output,
Transducer.Incrementor incrementor)
|
SumLatticeBeam(Transducer t,
Sequence input,
Sequence output,
Transducer.Incrementor incrementor,
boolean saveXis)
|
SumLatticeBeam(Transducer t,
Sequence input,
Sequence output,
Transducer.Incrementor incrementor,
boolean saveXis,
LabelAlphabet outputAlphabet)
|
SumLatticeBeam(Transducer t,
Sequence input,
Sequence output,
Transducer.Incrementor incrementor,
LabelAlphabet outputAlphabet,
int[] constraints)
Create a lattice that constrains its transitions such that the
pairs in "constraints" are adhered
to. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
beamWidth
protected static int beamWidth
SumLatticeBeam
public SumLatticeBeam(Transducer t,
Sequence input,
Sequence output,
Transducer.Incrementor incrementor)
SumLatticeBeam
public SumLatticeBeam(Transducer t,
Sequence input,
Sequence output,
Transducer.Incrementor incrementor,
boolean saveXis)
SumLatticeBeam
public SumLatticeBeam(Transducer t,
Sequence input,
Sequence output,
Transducer.Incrementor incrementor,
boolean saveXis,
LabelAlphabet outputAlphabet)
SumLatticeBeam
public SumLatticeBeam(Transducer t,
Sequence input,
Sequence output,
Transducer.Incrementor incrementor,
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.
getBeamWidth
public int getBeamWidth()
setBeamWidth
public void setBeamWidth(int beamWidth)
getTctIter
public int getTctIter()
setCurIter
public void setCurIter(int curIter)
incIter
public void incIter()
setKLeps
public void setKLeps(double KLeps)
setRmin
public void setRmin(double Rmin)
getNstatesExpl
public double[] getNstatesExpl()
getUseForwardBackwardBeam
public boolean getUseForwardBackwardBeam()
setUseForwardBackwardBeam
public void setUseForwardBackwardBeam(boolean state)
getInput
public Sequence getInput()
- Specified by:
getInput
in interface SumLattice
getTotalWeight
public double getTotalWeight()
- Specified by:
getTotalWeight
in interface SumLattice
getGammaWeight
public double getGammaWeight(int inputPosition,
Transducer.State s)
- Specified by:
getGammaWeight
in interface SumLattice
getGammaProbability
public double getGammaProbability(int inputPosition,
Transducer.State s)
- Specified by:
getGammaProbability
in interface SumLattice
getXis
public double[][][] getXis()
- Specified by:
getXis
in interface SumLattice
getGammas
public double[][] getGammas()
- Specified by:
getGammas
in interface SumLattice
getXiProbability
public double getXiProbability(int ip,
Transducer.State s1,
Transducer.State s2)
- Specified by:
getXiProbability
in interface SumLattice
getXiWeight
public double getXiWeight(int ip,
Transducer.State s1,
Transducer.State s2)
- Specified by:
getXiWeight
in interface SumLattice
length
public int length()
- Specified by:
length
in interface SumLattice
getAlpha
public double getAlpha(int ip,
Transducer.State s)
- Specified by:
getAlpha
in interface SumLattice
getBeta
public double getBeta(int ip,
Transducer.State s)
- Specified by:
getBeta
in interface SumLattice
getLabelingAtPosition
public LabelVector getLabelingAtPosition(int outputPosition)
- Specified by:
getLabelingAtPosition
in interface SumLattice
getTransducer
public Transducer getTransducer()
- Specified by:
getTransducer
in interface SumLattice