Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

dfa_decode.c File Reference

Prediction of next words based on DFA grammar for stack decoding (2nd pass). More...

#include <julius.h>

Include dependency graph for dfa_decode.c:

Go to the source code of this file.

Functions

int dfa_firstwords (NEXTWORD **nw, int peseqlen, int maxnw, DFA_INFO *dfa)
int dfa_nextwords (NODE *hypo, NEXTWORD **nw, int maxnw, DFA_INFO *dfa)
boolean dfa_acceptable (NODE *hypo, DFA_INFO *dfa)
boolean dfa_look_around (NEXTWORD *nword, NODE *hypo, BACKTRELLIS *bt)


Detailed Description

Prediction of next words based on DFA grammar for stack decoding (2nd pass).

Author:
Akinobu LEE
Date:
Mon Mar 7 15:31:00 2005
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.

In Julian, the location where a (short) pause can be inserted should be explicitly specified by grammar, just like other words. Since user does not always place pause at the specified place, the decoder have to consider the skipping of such short pause word for the next word prediction.

If a short pause word is contained in the set of next word candidates, word set next to the short pause word is further included in the word candidates. Whether short pause was actually inserted or not in the user input will be determined by score in search_bestfirst_main.c.

In Julian mode, dfa_firstwords(), dfa_nextwords(), dfa_acceptable() and dfa_eosscore() are called from main search function wchmm_fbs(). When Julius mode, on the other hand, the corresponding functions in ngram_decode.c will be used instead.

Revision
1.1.1.1

Definition in file dfa_decode.c.


Function Documentation

int dfa_firstwords NEXTWORD **  nw,
int  peseqlen,
int  maxnw,
DFA_INFO dfa
 

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
dfa [in] DFA grammar structure
Returns:
the number of predicted words, or -1 on error.

Definition at line 86 of file dfa_decode.c.

Referenced by wchmm_fbs().

int dfa_nextwords NODE hypo,
NEXTWORD **  nw,
int  maxnw,
DFA_INFO dfa
 

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
dfa [in] DFA grammar structure
Returns:
the number of predicted words, or -1 on error.

Definition at line 144 of file dfa_decode.c.

Referenced by wchmm_fbs().

boolean dfa_acceptable NODE hypo,
DFA_INFO dfa
 

Return whether the hypothesis is currently on final state

Parameters:
hypo [in] sentence hypothesis
dfa [in] DFA grammar structure
Returns:
TRUE when on final state, or FALSE if not acceptable.

Definition at line 201 of file dfa_decode.c.

Referenced by wchmm_fbs().

boolean dfa_look_around NEXTWORD nword,
NODE hypo,
BACKTRELLIS bt
 

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
bt [in] word trellis structure
Returns:
TRUE if the nextword exists on the word trellis around the estimated connection point, or FALSE if not exist.

Definition at line 242 of file dfa_decode.c.

Referenced by wchmm_fbs().


Generated on Tue Mar 28 16:17:50 2006 for Julius by  doxygen 1.4.2