edu.cmu.sphinx.linguist.acoustic
Class HMMPosition

java.lang.Object
  extended byedu.cmu.sphinx.linguist.acoustic.HMMPosition
All Implemented Interfaces:
java.io.Serializable

public class HMMPosition
extends java.lang.Object
implements java.io.Serializable

Defines possible positions of HMMs. Note that even though the positions are defined to be within words, some recognizers may classify positions in terms of other elements besides words.

See Also:
Serialized Form

Field Summary
static HMMPosition BEGIN
          HMM is at the beginning position of the word
static HMMPosition END
          HMM is at the end position of the word
static HMMPosition INTERNAL
          HMM is completely internal to the word
static int MAX_POSITIONS
          The maximum number of HMM positions
static HMMPosition SINGLE
          HMM is at the beginning and the end of the word
static HMMPosition UNDEFINED
          HMM is at an undefined position n the word
 
Method Summary
 int getIndex()
          Returns the index for this position.
 boolean isWordBeginning()
          Determines if this position is word beginning position
 boolean isWordEnd()
          Determines if this position is an end word position
static java.util.Iterator iterator()
          Returns an iterator for all HMMPositions
static HMMPosition lookup(java.lang.String rep)
          Looks up an HMMPosition baed upon its representation
 java.lang.String toString()
          Returns a string representation of this object
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

BEGIN

public static final HMMPosition BEGIN
HMM is at the beginning position of the word


END

public static final HMMPosition END
HMM is at the end position of the word


SINGLE

public static final HMMPosition SINGLE
HMM is at the beginning and the end of the word


INTERNAL

public static final HMMPosition INTERNAL
HMM is completely internal to the word


UNDEFINED

public static final HMMPosition UNDEFINED
HMM is at an undefined position n the word


MAX_POSITIONS

public static final int MAX_POSITIONS
The maximum number of HMM positions

See Also:
Constant Field Values
Method Detail

lookup

public static HMMPosition lookup(java.lang.String rep)
Looks up an HMMPosition baed upon its representation

Parameters:
rep - the string representation
Returns:
the HMMPosition represented by rep or null if not found

getIndex

public int getIndex()
Returns the index for this position. Each HMMPosition maintains a unique index. This allows arrays of hmm positions to be easily maintained

Returns:
the index

isWordEnd

public boolean isWordEnd()
Determines if this position is an end word position

Returns:
true if this is an end of word position

isWordBeginning

public boolean isWordBeginning()
Determines if this position is word beginning position

Returns:
true if this is a word beginning position

iterator

public static java.util.Iterator iterator()
Returns an iterator for all HMMPositions

Returns:
an iterator that iterates through all positions

toString

public java.lang.String toString()
Returns a string representation of this object

Returns:
the string representation