edu.cmu.sphinx.research.parallel
Class CombineToken

java.lang.Object
  extended byedu.cmu.sphinx.decoder.search.Token
      extended byedu.cmu.sphinx.research.parallel.CombineToken
All Implemented Interfaces:
Scoreable

public class CombineToken
extends Token

A token for the sentence HMM states that are not feature stream-specific. The getScore() method returns the combined score. A combined token carries a parallel token for each feature stream, so that scores pertaining to each stream can be propagated.


Field Summary
 
Fields inherited from class edu.cmu.sphinx.decoder.search.Token
COMPARATOR
 
Constructor Summary
CombineToken(Token predecessor, SentenceHMMState state, int frameNumber)
          Constructs a CombineToken
 
Method Summary
 void addAll(java.util.List tokenList)
          Adds all the ParallelTokens in the given list into this CombineToken.
 ParallelToken addParallelToken(java.lang.Object key, ParallelToken parallelToken)
          Adds the parallel score of the given parallel stream.
 void clear()
          Removes all the ParallelTokens from this CombineToken.
 float getCombinedScore()
          Returns the combined score of this CombineToken.
 ParallelToken getParallelToken(FeatureStream stream)
          Returns the parallel token of the given parallel stream.
 java.util.Collection getParallelTokens()
          Returns a Collection of all the parallel tokens.
 java.util.Iterator getTokenIterator()
          Returns an Iterator for the ParallelToken(s).
 void setCombinedScore(float combinedScore)
          Sets the combined score.
 void setLastCombineTime(int frameNumber)
          Sets the last combine time of all the ParallelTokens in this CombineToken.
 java.lang.String toString()
          Returns the string representation of this object.
 
Methods inherited from class edu.cmu.sphinx.decoder.search.Token
calculateScore, child, dumpTokenPath, dumpTokenPath, getAcousticScore, getAppObject, getData, getFrameNumber, getInsertionProbability, getLanguageScore, getLocation, getPredecessor, getScore, getSearchState, getWord, getWordPath, getWordPath, getWordPathNoFiller, getWordUnitPath, getWorkingScore, isEmitting, isFinal, isWord, normalizeScore, setAppObject, setLocation, setPredecessorClass, setScore, setWorkingScore, showCount, validate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CombineToken

public CombineToken(Token predecessor,
                    SentenceHMMState state,
                    int frameNumber)
Constructs a CombineToken

Parameters:
predecessor - the predecessor for this token
state - the SentenceHMMState associated with this token
frameNumber - the frame number associated with this token
Method Detail

getCombinedScore

public float getCombinedScore()
Returns the combined score of this CombineToken.

Returns:
the combined score

setCombinedScore

public void setCombinedScore(float combinedScore)
Sets the combined score.

Parameters:
combinedScore - the combined score

addParallelToken

public ParallelToken addParallelToken(java.lang.Object key,
                                      ParallelToken parallelToken)
Adds the parallel score of the given parallel stream.

Parameters:
key - the stream name
parallelToken - the the parallel token

addAll

public void addAll(java.util.List tokenList)
Adds all the ParallelTokens in the given list into this CombineToken. The added tokens are keyed by their model name.

Parameters:
tokenList - the list of ParallelTokens

clear

public void clear()
Removes all the ParallelTokens from this CombineToken.


getTokenIterator

public java.util.Iterator getTokenIterator()
Returns an Iterator for the ParallelToken(s).

Returns:
an Iterator for the ParallelToken(s)

getParallelTokens

public java.util.Collection getParallelTokens()
Returns a Collection of all the parallel tokens.

Returns:
a Collection of all the parallel tokens

getParallelToken

public ParallelToken getParallelToken(FeatureStream stream)
Returns the parallel token of the given parallel stream.

Returns:
the parallel token of the given parallel stream

setLastCombineTime

public void setLastCombineTime(int frameNumber)
Sets the last combine time of all the ParallelTokens in this CombineToken.

Parameters:
frameNumber - the last combine time

toString

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

Overrides:
toString in class Token
Returns:
the string representation of this object