|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ActiveList
An active list is maintained as a sorted list
Note that all scores are represented in LogMath logbase
Field Summary | |
---|---|
static java.lang.String |
PROP_ABSOLUTE_BEAM_WIDTH
property that sets the desired (or target) size for this active list. |
static int |
PROP_ABSOLUTE_BEAM_WIDTH_DEFAULT
The default value for the PROP_ABSOLUTE_BEAM_WIDTH property |
static java.lang.String |
PROP_RELATIVE_BEAM_WIDTH
Property that sets the minimum score relative to the maximum score in the list for pruning. |
static double |
PROP_RELATIVE_BEAM_WIDTH_DEFAULT
The default value for the PROP_RELATIVE_BEAM_WIDTH property |
static java.lang.String |
PROP_STRICT_PRUNING
Property that indicates whether or not the active list will implement 'strict pruning'. |
static boolean |
PROP_STRICT_PRUNING_DEFAULT
The default for the PROP_STRICT_PRUNING property |
Method Summary | |
---|---|
void |
add(Token token)
Adds the given token to the list, keeping track of the lowest scoring token |
float |
getBeamThreshold()
gets the beam threshold best upon the best scoring token |
float |
getBestScore()
gets the best score in the list |
Token |
getBestToken()
Gets the best scoring token for this active list |
java.util.List<Token> |
getTokens()
Gets the list of all tokens |
java.util.Iterator<Token> |
iterator()
Returns an iterator over the elements in this active list |
ActiveList |
newInstance()
Creates a new empty version of this active list with the same general properties. |
ActiveList |
purge()
Purges the active list of excess members returning a (potentially new) active list |
void |
replace(Token oldToken,
Token newToken)
Replaces an old token with a new token |
void |
setBestToken(Token token)
Sets the best scoring token for this active list |
int |
size()
Returns the size of this list |
Field Detail |
---|
static final java.lang.String PROP_ABSOLUTE_BEAM_WIDTH
static final int PROP_ABSOLUTE_BEAM_WIDTH_DEFAULT
static final java.lang.String PROP_RELATIVE_BEAM_WIDTH
static final double PROP_RELATIVE_BEAM_WIDTH_DEFAULT
static final java.lang.String PROP_STRICT_PRUNING
static final boolean PROP_STRICT_PRUNING_DEFAULT
Method Detail |
---|
void add(Token token)
token
- the token to addvoid replace(Token oldToken, Token newToken)
oldToken
- the token to replace (or null in which case, replace works like add).newToken
- the new token to be placed in the list.ActiveList purge()
java.util.Iterator<Token> iterator()
int size()
java.util.List<Token> getTokens()
float getBeamThreshold()
float getBestScore()
void setBestToken(Token token)
token
- the best scoring tokenToken getBestToken()
ActiveList newInstance()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |