libjulius/src/dfa_decode.c File Reference

Grammar-based word prediction (2nd pass). More...

#include <julius/julius.h>

Go to the source code of this file.

Functions

int dfa_firstwords (NEXTWORD **nw, int peseqlen, int maxnw, RecogProcess *r)
 Return initial word set from grammar.
int dfa_nextwords (NODE *hypo, NEXTWORD **nw, int maxnw, RecogProcess *r)
 Given a part-of-sentence hypothesis, returns the next word set defined by DFA grammar.
boolean dfa_acceptable (NODE *hypo, RecogProcess *r)
 Return whether the hypothesis is currently on final state.
boolean dfa_look_around (NEXTWORD *nword, NODE *hypo, RecogProcess *r)
 Check if the given nextword exists in the word trellis around the estimated connection time.


Detailed Description

Grammar-based word prediction (2nd pass).

Given a part-of-sentence hypothesis, these function determine a set of next words allowed to be connected by the grammar. Actually, only words in the word trellis, which exist around the estimated word-end frame will be expanded.

When using DFA grammar, the possible (short) pause insertion point should be explicitly specified in grammar, by defining "short-pause word" in vocabulary and write its appearance in grammar. Since a short pause will not always appear on the specified point, Julius will consider the skipping of such short pause word for the next word prediction in these functions. Whether short pause was actually inserted or not in the user input will be determined by score in search_bestfirst_main.c.

In recognition process instance with DFA grammar, dfa_firstwords(), dfa_nextwords(), dfa_acceptable() and dfa_eosscore() will be called from main search function wchmm_fbs(). When using N-gram, on the other hand, the corresponding functions in ngram_decode.c will be used instead.

Author:
Akinobu LEE
Date:
Mon Mar 7 15:31:00 2005
Revision
1.1.1.1

Definition in file dfa_decode.c.


Function Documentation

int dfa_firstwords ( NEXTWORD **  nw,
int  peseqlen,
int  maxnw,
RecogProcess r 
)

Return initial word set from grammar.

Parameters:
nw [out] pointer to hold the resulting next word set
peseqlen [in] input frame length
maxnw [in] maximum number of words that can be set in nw
r [in] recognition process instance
Returns:
the number of predicted words, or -1 on error.

Definition at line 89 of file dfa_decode.c.

int dfa_nextwords ( NODE hypo,
NEXTWORD **  nw,
int  maxnw,
RecogProcess r 
)

Given a part-of-sentence hypothesis, returns the next word set defined by DFA grammar.

Parameters:
hypo [in] the source part-of-sentene hypothesis
nw [out] pointer to hold the resulting next word set
maxnw [in] maximum number of words that can be set in nw
r [in] recognition process instance
Returns:
the number of predicted words, or -1 on error.

Definition at line 155 of file dfa_decode.c.

boolean dfa_acceptable ( NODE hypo,
RecogProcess r 
)

Return whether the hypothesis is currently on final state.

Parameters:
hypo [in] sentence hypothesis
r [in] recognition process instance
Returns:
TRUE when on final state, or FALSE if not acceptable.

Definition at line 222 of file dfa_decode.c.

boolean dfa_look_around ( NEXTWORD nword,
NODE hypo,
RecogProcess r 
)

Check if the given nextword exists in the word trellis around the estimated connection time.

If exist, set the pointer to the corresponding trellis word to the nextword. Since the best connection time will be re-computed later, it need not to be an optimal one.

Parameters:
nword [i/o] next word candidate (pointer to the found trellis word will be set)
hypo [in] source part-of-sentence hypothesis
r [in] recognition process instance
Returns:
TRUE if the nextword exists on the word trellis around the estimated connection point, or FALSE if not exist.

Definition at line 267 of file dfa_decode.c.


Generated on Tue Dec 18 16:01:01 2007 for Julius by  doxygen 1.5.4