public class AlternateHypothesisManager
extends java.lang.Object
Constructor and Description |
---|
AlternateHypothesisManager(int maxEdges)
Creates an alternate hypotheses manager
|
Modifier and Type | Method and Description |
---|---|
void |
addAlternatePredecessor(Token token,
Token predecessor)
Collects adds alternate predecessors for a token that would have lost because of viterbi.
|
java.util.List<Token> |
getAlternatePredecessors(Token token)
Returns a list of alternate predecessors for a token.
|
boolean |
hasAlternatePredecessors(Token token) |
void |
purge()
Purge all but max number of alternate preceding token hypotheses.
|
public AlternateHypothesisManager(int maxEdges)
maxEdges
- the maximum edges allowedpublic void addAlternatePredecessor(Token token, Token predecessor)
token
- - a token that has an alternate lower scoring predecessor that still might be of interestpredecessor
- - a predecessor that scores lower than token.getPredecessor().public java.util.List<Token> getAlternatePredecessors(Token token)
token
- - a token that may have alternate lower scoring predecessor that still might be of interestpublic void purge()
public boolean hasAlternatePredecessors(Token token)