edu.cmu.sphinx.linguist.acoustic.tiedstate
Class SenoneHMM

java.lang.Object
  extended byedu.cmu.sphinx.linguist.acoustic.tiedstate.SenoneHMM
All Implemented Interfaces:
HMM

public class SenoneHMM
extends java.lang.Object
implements HMM

Represents a hidden-markov-model. An HMM consists of a unit (context dependent or independent), a transition matrix from state to state, and a sequence of senones associated with each state. This representation of an HMM is a specialized left-to-right markov model. No backward transitions are allowed.


Constructor Summary
SenoneHMM(Unit unit, SenoneSequence senoneSequence, float[][] transitionMatrix, HMMPosition position)
          Constructs an HMM
 
Method Summary
 boolean equals(java.lang.Object o)
           
 Unit getBaseUnit()
          Gets the base unit associated with this HMM
 HMMState getInitialState()
          Gets the initial states (with probabilities) for this HMM
 int getOrder()
          Returns the order of the HMM
 HMMPosition getPosition()
          Retrieves the position of this HMM.
 SenoneSequence getSenoneSequence()
          Returns the SenoneSequence associated with this HMM
 HMMState getState(int which)
          Retrieves the hmm state
 float[][] getTransitionMatrix()
          Returns the transition matrix that determines the state transition probabilities for the matrix.
 float getTransitionProbability(int stateFrom, int stateTo)
          Returns the transition probability between two states.
 Unit getUnit()
          Gets the unit associated with this HMM
 int hashCode()
           
 boolean isComposite()
          Determines if this HMM is a composite HMM
 boolean isContextDependent()
          Determines if this HMM corresponds to a context dependent unit
 boolean isFiller()
          Determines if this HMM represents a filler unit.
 java.lang.String toString()
          Returns the string representation of this object
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SenoneHMM

public SenoneHMM(Unit unit,
                 SenoneSequence senoneSequence,
                 float[][] transitionMatrix,
                 HMMPosition position)
Constructs an HMM

Parameters:
unit - the unit for this HMM
senoneSequence - the sequence of senones for this HMM
transitionMatrix - the state transition matrix
position - the position associated with this HMM
Method Detail

getUnit

public Unit getUnit()
Gets the unit associated with this HMM

Specified by:
getUnit in interface HMM
Returns:
the unit associated with this HMM

getBaseUnit

public Unit getBaseUnit()
Gets the base unit associated with this HMM

Specified by:
getBaseUnit in interface HMM
Returns:
the unit associated with this HMM

getState

public HMMState getState(int which)
Retrieves the hmm state

Specified by:
getState in interface HMM
Parameters:
which - the state of interest

getOrder

public int getOrder()
Returns the order of the HMM

Specified by:
getOrder in interface HMM
Returns:
the order of the HMM

getSenoneSequence

public SenoneSequence getSenoneSequence()
Returns the SenoneSequence associated with this HMM

Returns:
the sequence of senones associated with this HMM. The length of the sequence is N, where N is the order of the HMM. Note that senone sequences may be shared among HMMs.

isComposite

public boolean isComposite()
Determines if this HMM is a composite HMM

Returns:
true if this is a composite hmm

getTransitionMatrix

public float[][] getTransitionMatrix()
Returns the transition matrix that determines the state transition probabilities for the matrix. Each entry in the transition matrix defines the probability of transitioning from one state to the next. For example, the probablility of transitioning from state 1 to state 2 can be determined byh accessesing transition matrix element[1][2].

Returns:
the transition matrix of size NxN where N is the order of the HMM

getTransitionProbability

public float getTransitionProbability(int stateFrom,
                                      int stateTo)
Returns the transition probability between two states.

Parameters:
stateFrom - the index of the state this transition goes from
stateTo - the index of the state this transition goes to
Returns:
the transition probability

getPosition

public HMMPosition getPosition()
Retrieves the position of this HMM. Possible

Specified by:
getPosition in interface HMM
Returns:
the position for this HMM

isFiller

public boolean isFiller()
Determines if this HMM represents a filler unit. A filler unit is speech that is not meaningful such as a cough, 'um' , 'er', or silence.

Returns:
true if the HMM represents a filler unit

isContextDependent

public boolean isContextDependent()
Determines if this HMM corresponds to a context dependent unit

Returns:
true if the HMM is context dependent

getInitialState

public HMMState getInitialState()
Gets the initial states (with probabilities) for this HMM

Specified by:
getInitialState in interface HMM
Returns:
the set of arcs that transition to the initial states for this HMM

toString

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

Returns:
the string representation

hashCode

public int hashCode()

equals

public boolean equals(java.lang.Object o)