edu.cmu.sphinx.decoder.search
Interface ActiveList

All Superinterfaces:
java.lang.Iterable<Token>

public interface ActiveList
extends java.lang.Iterable<Token>

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 java.lang.String PROP_RELATIVE_BEAM_WIDTH
          Property that sets the minimum score relative to the maximum score in the list for pruning.
static java.lang.String PROP_STRICT_PRUNING
          Property that indicates whether or not the active list will implement 'strict pruning'.
 
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
 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
 
Methods inherited from interface java.lang.Iterable
iterator
 

Field Detail

PROP_ABSOLUTE_BEAM_WIDTH

@S4Integer(defaultValue=2000)
static final java.lang.String PROP_ABSOLUTE_BEAM_WIDTH
property that sets the desired (or target) size for this active list. This is sometimes referred to as the beam size

See Also:
Constant Field Values

PROP_RELATIVE_BEAM_WIDTH

@S4Double(defaultValue=0.0)
static final java.lang.String PROP_RELATIVE_BEAM_WIDTH
Property that sets the minimum score relative to the maximum score in the list for pruning. Tokens with a score less than relativeBeamWidth * maximumScore will be pruned from the list

See Also:
Constant Field Values

PROP_STRICT_PRUNING

@S4Boolean(defaultValue=true)
static final java.lang.String PROP_STRICT_PRUNING
Property that indicates whether or not the active list will implement 'strict pruning'. When strict pruning is enabled, the active list will not remove tokens from the active list until they have been completely scored. If strict pruning is not enabled, tokens can be removed from the active list based upon their entry scores. The default setting is false (disabled).

See Also:
Constant Field Values
Method Detail

add

void add(Token token)
Adds the given token to the list, keeping track of the lowest scoring token

Parameters:
token - the token to add

replace

void replace(Token oldToken,
             Token newToken)
Replaces an old token with a new token

Parameters:
oldToken - the token to replace (or null in which case, replace works like add).
newToken - the new token to be placed in the list.

purge

ActiveList purge()
Purges the active list of excess members returning a (potentially new) active list

Returns:
a purged active list

size

int size()
Returns the size of this list

Returns:
the size

getTokens

java.util.List<Token> getTokens()
Gets the list of all tokens

Returns:
the set of tokens

getBeamThreshold

float getBeamThreshold()
gets the beam threshold best upon the best scoring token

Returns:
the beam threshold

getBestScore

float getBestScore()
gets the best score in the list

Returns:
the best score

setBestToken

void setBestToken(Token token)
Sets the best scoring token for this active list

Parameters:
token - the best scoring token

getBestToken

Token getBestToken()
Gets the best scoring token for this active list

Returns:
the best scoring token

newInstance

ActiveList newInstance()
Creates a new empty version of this active list with the same general properties.

Returns:
a new active list.