edu.cmu.sphinx.research.parallel
Class ParallelToken

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

public class ParallelToken
extends Token

A Token for the within parallel stream sentence HMM states. The getScore() method returns the parallel stream score.


Field Summary
 
Fields inherited from class edu.cmu.sphinx.decoder.search.Token
COMPARATOR
 
Constructor Summary
ParallelToken(ParallelToken predecessor, SentenceHMMState state, float featureScore, float combinedScore, int frameNumber)
          Constructs a ParallelToken
ParallelToken(ParallelToken predecessor, SentenceHMMState state, float featureScore, float combinedScore, int frameNumber, int lastCombineFrame)
          Constructs a ParallelToken
ParallelToken(ParallelToken predecessor, SentenceHMMState state, float featureScore, float combinedScore, int frameNumber, java.lang.String lastCombineStamp)
          Constructs a ParallelToken
ParallelToken(SentenceHMMState state, FeatureStream featureStream, int frameNumber)
          Constructs a ParallelToken with no predecessors, i.e., this is the ParallelToken at the first state of the SentenceHMM.
 
Method Summary
 float getCombinedScore()
          Returns the combined score of this ParallelToken.
 float getEta()
          Returns the eta factor for the feature stream of this ParallelToken.
 float getFeatureScore()
          Returns the feature score of this ParallelToken.
 FeatureStream getFeatureStream()
          Returns the FeatureStream of this ParallelToken.
 java.lang.String getLastCombineStamp()
          Returns the stamp used to identify the last score combination event.
 int getLastCombineTime()
          Returns the last frame score combination takes place.
 java.lang.String getModelName()
          Returns the name of the acoustic model.
 boolean isPruned()
          Returns true if this ParallelToken has been pruned.
 void setCombinedScore(float combinedScore)
          Sets the combined score of this ParallelToken.
 void setFeatureScore(float featureScore)
          Sets the feature score of this ParallelToken.
 void setLastCombineStamp(java.lang.String stamp)
          Sets the stamp used to identify the last score combination event.
 void setLastCombineTime(int frameNumber)
          Sets the frame number at which score combination takes place.
 void setPruned(boolean pruned)
          Sets this ParallelToken to be pruned.
 
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, toString, validate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ParallelToken

public ParallelToken(ParallelToken predecessor,
                     SentenceHMMState state,
                     float featureScore,
                     float combinedScore,
                     int frameNumber)
Constructs a ParallelToken

Parameters:
predecessor - the predecessor for this token
state - the SentenceHMMState associated with this token
featureScore - the score for this feature stream
combinedScore - the combinedScore
frameNumber - the frame number associated with this token

ParallelToken

public ParallelToken(ParallelToken predecessor,
                     SentenceHMMState state,
                     float featureScore,
                     float combinedScore,
                     int frameNumber,
                     int lastCombineFrame)
Constructs a ParallelToken

Parameters:
predecessor - the predecessor for this token
state - the SentenceHMMState associated with this token
featureScore - the score for this feature stream
combinedScore - the combinedScore
frameNumber - the frame number associated with this token
lastCombineFrame - the frame number at which score combination last occurred

ParallelToken

public ParallelToken(ParallelToken predecessor,
                     SentenceHMMState state,
                     float featureScore,
                     float combinedScore,
                     int frameNumber,
                     java.lang.String lastCombineStamp)
Constructs a ParallelToken

Parameters:
predecessor - the predecessor for this token
state - the SentenceHMMState associated with this token
featureScore - the score for this feature stream
combinedScore - the combinedScore
frameNumber - the frame number associated with this token
lastCombineStamp - the stamp used to identify the last score combination event

ParallelToken

public ParallelToken(SentenceHMMState state,
                     FeatureStream featureStream,
                     int frameNumber)
Constructs a ParallelToken with no predecessors, i.e., this is the ParallelToken at the first state of the SentenceHMM.

Parameters:
state - the SentenceHMMState associated with this token
featureStream - the feature stream of this ParallelToken
frameNumber - the frame number of this token
Method Detail

getFeatureStream

public FeatureStream getFeatureStream()
Returns the FeatureStream of this ParallelToken.

Returns:
the FeatureStream

getEta

public float getEta()
Returns the eta factor for the feature stream of this ParallelToken.

Returns:
the eta factor

getCombinedScore

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

Returns:
the combined score of this ParallelToken

getFeatureScore

public float getFeatureScore()
Returns the feature score of this ParallelToken.

Returns:
the feature score of this ParallelToken

getModelName

public java.lang.String getModelName()
Returns the name of the acoustic model.

Returns:
the name of the acoustic model

getLastCombineTime

public int getLastCombineTime()
Returns the last frame score combination takes place.

Returns:
the last frame score combination takes place

getLastCombineStamp

public java.lang.String getLastCombineStamp()
Returns the stamp used to identify the last score combination event.

Returns:
the stamp used to identify the last score combination event

setCombinedScore

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

Parameters:
combinedScore - the new combined score

setFeatureScore

public void setFeatureScore(float featureScore)
Sets the feature score of this ParallelToken.

Parameters:
featureScore - the new feature score

setLastCombineTime

public void setLastCombineTime(int frameNumber)
Sets the frame number at which score combination takes place.

Parameters:
frameNumber - the frame at which score combination last took place.

setLastCombineStamp

public void setLastCombineStamp(java.lang.String stamp)
Sets the stamp used to identify the last score combination event.

Parameters:
stamp - the stamp for identification

isPruned

public boolean isPruned()
Returns true if this ParallelToken has been pruned.

Returns:
true if this ParallelToken has been pruned.

setPruned

public void setPruned(boolean pruned)
Sets this ParallelToken to be pruned.

Parameters:
pruned - sets this ParallelToken to be pruned or not