edu.cmu.sphinx.research.parallel
Class SameStampScoreCombiner
java.lang.Object
edu.cmu.sphinx.research.parallel.SameStampScoreCombiner
- All Implemented Interfaces:
- ScoreCombiner
- public class SameStampScoreCombiner
- extends java.lang.Object
- implements ScoreCombiner
Combines the various unit feature stream scores in a CombineToken.
This SameStampScoreCombiner assumes that there can be more than one token
from each feature stream. It will take the highest scoring token
from each stream with the same identifying stamp, combine their
scores, and choose the one with the highest combined score.
For example, if tokens T1 and T2 from feature F1 had stamps
s1 and s2, and tokens Ta and Tb from feature F2 had stamps s1 and s2,
we must compare combinedScore(s1,Ta) and combineScore(s2,Tb), and retain
the one for which the combined score is higher.
All scores are maintained internally in the LogMath logbase
Method Summary |
void |
combineScore(CombineToken combineToken)
Combines the scores from all the feature stream in the given
CombineToken. |
java.util.List |
removeTokensByStamp(java.util.List tokenList,
java.lang.String stamp)
Remove all tokens in the given token list that has the given stamp. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SameStampScoreCombiner
public SameStampScoreCombiner()
removeTokensByStamp
public java.util.List removeTokensByStamp(java.util.List tokenList,
java.lang.String stamp)
- Remove all tokens in the given token list that has the given stamp.
- Parameters:
tokenList
- the token liststamp
- the stamp of tokens to remove
- Returns:
- a list of the removed tokens
combineScore
public void combineScore(CombineToken combineToken)
- Combines the scores from all the feature stream in the given
CombineToken. The feature stream(s) are represented in the form
of ParallelTokens in the given CombineToken.
- Specified by:
combineScore
in interface ScoreCombiner
- Parameters:
combineToken
- the CombineToken on which to combine the feature
stream scores