Package cc.mallet.fst
Class CRF.TransitionIterator
- java.lang.Object
-
- cc.mallet.fst.Transducer.TransitionIterator
-
- cc.mallet.fst.CRF.TransitionIterator
-
- All Implemented Interfaces:
java.io.Serializable,java.util.Iterator<Transducer.State>
- Direct Known Subclasses:
MEMM.TransitionIterator
- Enclosing class:
- CRF
protected static class CRF.TransitionIterator extends Transducer.TransitionIterator implements java.io.Serializable
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected double[]weights
-
Constructor Summary
Constructors Modifier Constructor Description protectedTransitionIterator(CRF.State source, FeatureVector fv, java.lang.String output, CRF crf)TransitionIterator(CRF.State source, FeatureVectorSequence inputSeq, int inputPosition, java.lang.String output, CRF crf)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringdescribeTransition(double cutoff)Transducer.StategetDestinationState()The state we are in after taking this transition.intgetIndex()An implementation-specific index for this transition object, can be used to index into arrays of per-transition parameters.java.lang.ObjectgetInput()The input symbol or object appearing on this transition.java.lang.ObjectgetOutput()The output symbol or object appearing on this transition.Transducer.StategetSourceState()The state we were in before taking this transition.doublegetWeight()The weight (between infinity and -infinity) associated with taking this transition with this input/output.booleanhasNext()Transducer.StatenextState()-
Methods inherited from class cc.mallet.fst.Transducer.TransitionIterator
getInputPositionIncrement, getOutputPositionIncrement, getTransducer, next, numberNext, remove
-
-
-
-
Constructor Detail
-
TransitionIterator
public TransitionIterator(CRF.State source, FeatureVectorSequence inputSeq, int inputPosition, java.lang.String output, CRF crf)
-
TransitionIterator
protected TransitionIterator(CRF.State source, FeatureVector fv, java.lang.String output, CRF crf)
-
-
Method Detail
-
hasNext
public boolean hasNext()
- Specified by:
hasNextin interfacejava.util.Iterator<Transducer.State>- Specified by:
hasNextin classTransducer.TransitionIterator
-
nextState
public Transducer.State nextState()
- Specified by:
nextStatein classTransducer.TransitionIterator
-
getIndex
public final int getIndex()
Description copied from class:Transducer.TransitionIteratorAn implementation-specific index for this transition object, can be used to index into arrays of per-transition parameters.- Specified by:
getIndexin classTransducer.TransitionIterator
-
getInput
public final java.lang.Object getInput()
Description copied from class:Transducer.TransitionIteratorThe input symbol or object appearing on this transition.- Specified by:
getInputin classTransducer.TransitionIterator
-
getOutput
public final java.lang.Object getOutput()
Description copied from class:Transducer.TransitionIteratorThe output symbol or object appearing on this transition.- Specified by:
getOutputin classTransducer.TransitionIterator
-
getWeight
public final double getWeight()
Description copied from class:Transducer.TransitionIteratorThe weight (between infinity and -infinity) associated with taking this transition with this input/output.- Specified by:
getWeightin classTransducer.TransitionIterator
-
getSourceState
public final Transducer.State getSourceState()
Description copied from class:Transducer.TransitionIteratorThe state we were in before taking this transition.- Specified by:
getSourceStatein classTransducer.TransitionIterator
-
getDestinationState
public final Transducer.State getDestinationState()
Description copied from class:Transducer.TransitionIteratorThe state we are in after taking this transition.- Specified by:
getDestinationStatein classTransducer.TransitionIterator
-
describeTransition
public java.lang.String describeTransition(double cutoff)
- Overrides:
describeTransitionin classTransducer.TransitionIterator
-
-