#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. |
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.
Definition in file dfa_decode.c.
int dfa_firstwords | ( | NEXTWORD ** | nw, | |
int | peseqlen, | |||
int | maxnw, | |||
RecogProcess * | r | |||
) |
Return initial word set from grammar.
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 |
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.
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 |
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.
hypo | [in] sentence hypothesis | |
r | [in] recognition process instance |
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.
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 |
Definition at line 267 of file dfa_decode.c.