Package cc.mallet.fst.semi_supervised.pr
Class SumLatticePR
- java.lang.Object
-
- cc.mallet.fst.semi_supervised.pr.SumLatticePR
-
- All Implemented Interfaces:
SumLattice
public class SumLatticePR extends java.lang.Object implements SumLattice
Lattice for E-step/I-projection in PR.- Author:
- Gregory Druck, Kedar Bellare
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classSumLatticePR.LatticeNode
-
Field Summary
Fields Modifier and Type Field Description protected double[][]gammasprotected LabelVector[]labelingsprotected intlatticeLengthprotected SumLatticePR.LatticeNode[][]nodesprotected doubletotalWeightprotected Transducertransducerprotected double[][][]xis
-
Constructor Summary
Constructors Constructor Description SumLatticePR(Transducer trans, int index, Sequence input, Sequence output, PRAuxiliaryModel auxModel, double[][][] cachedDots, boolean incrementConstraints, Transducer.Incrementor incrementor, LabelAlphabet outputAlphabet, boolean saveXis)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetAlpha(int ip, Transducer.State s)doublegetBeta(int ip, Transducer.State s)doublegetGammaProbability(int inputPosition, int stateIndex)doublegetGammaProbability(int inputPosition, Transducer.State s)double[][]getGammas()doublegetGammaWeight(int inputPosition, int stateIndex)doublegetGammaWeight(int inputPosition, Transducer.State s)SequencegetInput()LabelVectorgetLabelingAtPosition(int outputPosition)protected SumLatticePR.LatticeNodegetLatticeNode(int ip, int stateIndex)doublegetTotalWeight()TransducergetTransducer()doublegetXiProbability(int ip, Transducer.State s1, Transducer.State s2)double[][][]getXis()doublegetXiWeight(int ip, Transducer.State s1, Transducer.State s2)intlength()
-
-
-
Field Detail
-
totalWeight
protected double totalWeight
-
latticeLength
protected int latticeLength
-
gammas
protected double[][] gammas
-
xis
protected double[][][] xis
-
labelings
protected LabelVector[] labelings
-
transducer
protected Transducer transducer
-
nodes
protected SumLatticePR.LatticeNode[][] nodes
-
-
Constructor Detail
-
SumLatticePR
public SumLatticePR(Transducer trans, int index, Sequence input, Sequence output, PRAuxiliaryModel auxModel, double[][][] cachedDots, boolean incrementConstraints, Transducer.Incrementor incrementor, LabelAlphabet outputAlphabet, boolean saveXis)
-
-
Method Detail
-
getLatticeNode
protected SumLatticePR.LatticeNode getLatticeNode(int ip, int stateIndex)
-
getXis
public double[][][] getXis()
- Specified by:
getXisin interfaceSumLattice
-
getGammas
public double[][] getGammas()
- Specified by:
getGammasin interfaceSumLattice
-
getTotalWeight
public double getTotalWeight()
- Specified by:
getTotalWeightin interfaceSumLattice
-
getGammaWeight
public double getGammaWeight(int inputPosition, Transducer.State s)- Specified by:
getGammaWeightin interfaceSumLattice
-
getGammaWeight
public double getGammaWeight(int inputPosition, int stateIndex)
-
getGammaProbability
public double getGammaProbability(int inputPosition, Transducer.State s)- Specified by:
getGammaProbabilityin interfaceSumLattice
-
getGammaProbability
public double getGammaProbability(int inputPosition, int stateIndex)
-
getXiProbability
public double getXiProbability(int ip, Transducer.State s1, Transducer.State s2)- Specified by:
getXiProbabilityin interfaceSumLattice
-
getXiWeight
public double getXiWeight(int ip, Transducer.State s1, Transducer.State s2)- Specified by:
getXiWeightin interfaceSumLattice
-
length
public int length()
- Specified by:
lengthin interfaceSumLattice
-
getAlpha
public double getAlpha(int ip, Transducer.State s)- Specified by:
getAlphain interfaceSumLattice
-
getBeta
public double getBeta(int ip, Transducer.State s)- Specified by:
getBetain interfaceSumLattice
-
getLabelingAtPosition
public LabelVector getLabelingAtPosition(int outputPosition)
- Specified by:
getLabelingAtPositionin interfaceSumLattice
-
getTransducer
public Transducer getTransducer()
- Specified by:
getTransducerin interfaceSumLattice
-
getInput
public Sequence getInput()
- Specified by:
getInputin interfaceSumLattice
-
-