public class WordPruningBreadthFirstLookaheadSearchManager extends WordPruningBreadthFirstSearchManager
All scores and probabilities are maintained in the log math log domain.
Modifier and Type | Field and Description |
---|---|
protected ActiveList |
fastmatchActiveList |
protected java.util.Map<SearchState,Token> |
fastMatchBestTokenMap |
static java.lang.String |
PROP_FASTMATCH_LINGUIST
The property that defines the name of the linguist to be used for fast
match.
|
static java.lang.String |
PROP_FM_ACTIVE_LIST_FACTORY |
static java.lang.String |
PROP_LOADER
The property that to get direct access to gau for score caching control.
|
static java.lang.String |
PROP_LOOKAHEAD_PENALTY_WEIGHT |
static java.lang.String |
PROP_LOOKAHEAD_WINDOW
The property that controls size of lookahead window.
|
acousticLookaheadFrames, activeList, bestTokenMap, checkStateOrder, currentCollectTime, currentFrameNumber, curTokensScored, growTimer, linguist, logger, logMath, loserManager, PROP_ACOUSTIC_LOOKAHEAD_FRAMES, PROP_ACTIVE_LIST_MANAGER, PROP_CHECK_STATE_ORDER, PROP_GROW_SKIP_INTERVAL, PROP_LINGUIST, PROP_MAX_LATTICE_EDGES, PROP_PRUNER, PROP_RELATIVE_BEAM_WIDTH, PROP_SCORER, PROP_SHOW_TOKEN_COUNT, pruner, pruneTimer, relativeBeamWidth, resultList, scorer, scoreTimer, showTokenCount, streamEnd, tokensCreated, totalTokensScored
buildWordLattice, keepAllTokens, PROP_BUILD_WORD_LATTICE, PROP_KEEP_ALL_TOKENS
Constructor and Description |
---|
WordPruningBreadthFirstLookaheadSearchManager() |
WordPruningBreadthFirstLookaheadSearchManager(Linguist linguist,
Linguist fastmatchLinguist,
Loader loader,
Pruner pruner,
AcousticScorer scorer,
ActiveListManager activeListManager,
ActiveListFactory fastmatchActiveListFactory,
boolean showTokenCount,
double relativeWordBeamWidth,
int growSkipInterval,
boolean checkStateOrder,
boolean buildWordLattice,
int lookaheadWindow,
float lookaheadWeight,
int maxLatticeEdges,
float acousticLookaheadFrames,
boolean keepAllTokens)
Creates a pruning manager with lookahead
|
Modifier and Type | Method and Description |
---|---|
protected void |
collectFastMatchSuccessorTokens(Token token) |
protected void |
collectSuccessorTokens(Token token)
Collects the next set of emitting tokens from a token and accumulates
them in the active or result lists
|
protected void |
createFastMatchBestTokenMap()
creates a new best token map with the best size
|
protected Token |
getFastMatchBestToken(SearchState state) |
protected void |
growFastmatchBranches()
Goes through the fast match active list of tokens and expands each token,
finding the set of successor tokens until all the successor tokens are
emitting tokens.
|
protected void |
localStart()
Gets the initial grammar node from the linguist and creates a
GrammarNodeToken
|
void |
newProperties(PropertySheet ps)
This method is called when this configurable component needs to be reconfigured.
|
protected void |
pruneFastMatchBranches()
Removes unpromising branches from the fast match active list
|
Result |
recognize(int nFrames)
Performs the recognition for the given number of frames.
|
protected boolean |
scoreFastMatchTokens() |
protected void |
setFastMatchBestToken(Token token,
SearchState state) |
activeListAdd, allocate, allowExpansion, checkStateOrder, createBestTokenMap, deallocate, getActiveList, getBestToken, getCurrentFrameNumber, getGrowTimer, getResultList, getTokensCreated, growBranches, growEmittingBranches, isVisited, localStop, monitorStates, pruneBranches, recognize, scoreTokens, setActiveList, setBestToken, setResultList, showTokenCount, startRecognition, stopRecognition
getResultListPredecessor
@S4Component(type=Loader.class) public static final java.lang.String PROP_LOADER
@S4Component(type=Linguist.class) public static final java.lang.String PROP_FASTMATCH_LINGUIST
@S4Component(type=ActiveListFactory.class) public static final java.lang.String PROP_FM_ACTIVE_LIST_FACTORY
@S4Double(defaultValue=1.0) public static final java.lang.String PROP_LOOKAHEAD_PENALTY_WEIGHT
@S4Integer(defaultValue=5) public static final java.lang.String PROP_LOOKAHEAD_WINDOW
protected ActiveList fastmatchActiveList
protected java.util.Map<SearchState,Token> fastMatchBestTokenMap
public WordPruningBreadthFirstLookaheadSearchManager(Linguist linguist, Linguist fastmatchLinguist, Loader loader, Pruner pruner, AcousticScorer scorer, ActiveListManager activeListManager, ActiveListFactory fastmatchActiveListFactory, boolean showTokenCount, double relativeWordBeamWidth, int growSkipInterval, boolean checkStateOrder, boolean buildWordLattice, int lookaheadWindow, float lookaheadWeight, int maxLatticeEdges, float acousticLookaheadFrames, boolean keepAllTokens)
linguist
- a linguist for search spacefastmatchLinguist
- a linguist for fast search spacepruner
- pruner to drop tokensloader
- model loaderscorer
- scorer to estimate token probabilityactiveListManager
- active list manager to store tokensfastmatchActiveListFactory
- fast match active list factor to store phoneloop tokensshowTokenCount
- show count during decodingrelativeWordBeamWidth
- relative beam for lookahead pruninggrowSkipInterval
- skip interval for growncheckStateOrder
- check order of states during growthbuildWordLattice
- build a lattice during decodingmaxLatticeEdges
- max edges to keep in latticeacousticLookaheadFrames
- frames to do lookaheadkeepAllTokens
- keep tokens including emitting tokenslookaheadWindow
- window for lookaheadlookaheadWeight
- weight for lookahead pruningpublic WordPruningBreadthFirstLookaheadSearchManager()
public void newProperties(PropertySheet ps) throws PropertyException
Configurable
newProperties
in interface Configurable
newProperties
in class WordPruningBreadthFirstSearchManager
ps
- a property sheet holding the new dataPropertyException
- if there is a problem with the properties.public Result recognize(int nFrames)
recognize
in interface SearchManager
recognize
in class WordPruningBreadthFirstSearchManager
nFrames
- the number of frames to recognizeprotected void createFastMatchBestTokenMap()
protected void localStart()
localStart
in class WordPruningBreadthFirstSearchManager
protected void growFastmatchBranches()
protected boolean scoreFastMatchTokens()
protected void pruneFastMatchBranches()
protected Token getFastMatchBestToken(SearchState state)
protected void setFastMatchBestToken(Token token, SearchState state)
protected void collectFastMatchSuccessorTokens(Token token)
protected void collectSuccessorTokens(Token token)
collectSuccessorTokens
in class WordPruningBreadthFirstSearchManager
token
- the token to collect successors from be immediately expanded
are placed. Null if we should always expand all nodes.