#include <julius.h>
Include dependency graph for search_bestfirst_main.c:
Go to the source code of this file.
Functions | |
static NODE * | get_best_from_stack (NODE **start, int *stacknum) |
static int | put_to_stack (NODE *new, NODE **start, NODE **bottom, int *stacknum, int stacksize) |
static void | put_all_in_stack (NODE **start, int *stacknum) |
static void | free_all_nodes (NODE *node) |
static void | put_hypo_woutput (NODE *hypo) |
static void | put_hypo_wname (NODE *hypo) |
static NEXTWORD ** | nw_malloc (int *maxlen, NEXTWORD **root) |
static void | nw_free (NEXTWORD **nw, NEXTWORD *root) |
static NEXTWORD ** | nw_expand (NEXTWORD **nwold, int *maxlen, NEXTWORD **root) |
expand data area of NEXTWORD. | |
static int | can_put_to_stack (NODE *new, NODE **bottom, int *stacknum, int stacksize) |
static void | cm_init (WORD_INFO *winfo) |
static void | cm_store (NODE *new) |
static void | cm_sum_score () |
static void | cm_set_score (NODE *node) |
static NODE * | cm_get_node () |
static void | wb_init () |
static boolean | wb_ok (NODE *now) |
static void | envl_init (int framenum) |
static void | envl_update (NODE *n, int framenum) |
static void | result_reorder_and_output (NODE **r_start, NODE **r_bottom, int *r_stacknum, int ncan, WORD_INFO *winfo) |
void | wchmm_fbs (HTK_Param *param, BACKTRELLIS *backtrellis, LOGPROB backmax, int stacksize, int ncan, int maxhypo, int cate_bgn, int cate_num) |
Variables | |
static LOGPROB | cm_tmpbestscore |
Temporal best score for summing up scores. | |
static LOGPROB | cm_tmpsum |
Sum of CM score. | |
static int | l_stacksize |
Local stack size for CM. | |
static int | l_stacknum |
Num of hypo. in local stack for CM. | |
static NODE * | l_start = NULL |
Top node of local stack for CM. | |
static NODE * | l_bottom = NULL |
bottom node of local stack for CM | |
static int | hypo_len_count [MAXSEQNUM+1] |
Count of popped hypothesis per each length. | |
static int | maximum_filled_length |
Current least beam-filled depth. | |
static NEXTWORD | fornoise |
static HTK_Param * | tparam |
Temporal parameter for forced alignment. |
The expanding words will be given by ngram_decode.c for N-gram based recognition (Julius), with their langugage probabilities, or by dfa_decode.c for grammar-based recognition (Julian), with their emitting DFA state information.
The dynamic confidence scoring using local posterior probability, score envelope beaming, and other techniques are also implemented within this file.
Definition in file search_bestfirst_main.c.
|
Pop the best hypothesis from stack.
Definition at line 217 of file search_bestfirst_main.c. Referenced by cm_get_node(), put_all_in_stack(), result_reorder_and_output(), and wchmm_fbs(). |
|
Push a new hypothesis into the stack, keeping score order. If not succeeded, the given new hypothesis will be freed by free_node().
Definition at line 300 of file search_bestfirst_main.c. Referenced by cm_store(), and wchmm_fbs(). |
|
Output all nodes in the stack. All nodes will be lost (for debug).
Definition at line 386 of file search_bestfirst_main.c. Referenced by wchmm_fbs(). |
|
Free all nodes in a stack.
Definition at line 411 of file search_bestfirst_main.c. Referenced by result_reorder_and_output(), and wchmm_fbs(). |
|
Output word sequence of a hypothesis for debug.
Definition at line 932 of file search_bestfirst_main.c. |
|
Output N-gram entries (or DFA category IDs) of a hypothesis for debug.
Definition at line 958 of file search_bestfirst_main.c. |
|
Allocate NEXTWORD array for storing list of candidate next words
Definition at line 87 of file search_bestfirst_main.c. Referenced by wchmm_fbs(). |
|
Free given NEXTWORD data.
Definition at line 123 of file search_bestfirst_main.c. Referenced by wchmm_fbs(). |
|
expand data area of NEXTWORD. In DFA mode, the number of nextwords can exceed the vocabulary size when more than one DFA states are expanded by short-pause skipping. In such case, the nextword data area should expanded here.
Definition at line 167 of file search_bestfirst_main.c. Referenced by wchmm_fbs(). |
|
Check whether a hypothesis will be stored in the stack.
Definition at line 261 of file search_bestfirst_main.c. Referenced by wchmm_fbs(). |
|
Initialize parameters for confidence scoring (will be called at each startup of 2nd pass)
Definition at line 470 of file search_bestfirst_main.c. Referenced by wchmm_fbs(). |
|
Store an expanded hypothesis to the local stack for later CM scoring
Definition at line 495 of file search_bestfirst_main.c. Referenced by wchmm_fbs(). |
|
Compute sum of probabilities for hypotheses in the local stack for CM scoring. Definition at line 513 of file search_bestfirst_main.c. Referenced by wchmm_fbs(). |
|
Compute confidence score of a new word at the end of the given hypothesis, based on the local posterior probabilities.
Definition at line 559 of file search_bestfirst_main.c. Referenced by wchmm_fbs(). |
|
Pop one node from local stack for confidence scoring.
Definition at line 589 of file search_bestfirst_main.c. Referenced by wchmm_fbs(). |
|
Initialize counters fro word enveloping. Definition at line 731 of file search_bestfirst_main.c. Referenced by wchmm_fbs(). |
|
Consult the current word envelope to check if word expansion from the hypothesis node is allowed or not. Also increment the counter of word envelope if needed.
Definition at line 761 of file search_bestfirst_main.c. Referenced by wchmm_fbs(). |
|
Initialize score envelope. This will be called once at the beginning of 2nd pass.
Definition at line 825 of file search_bestfirst_main.c. Referenced by wchmm_fbs(). |
|
Update the score envelope using forward score of the given hypothesis.
Definition at line 846 of file search_bestfirst_main.c. Referenced by wchmm_fbs(). |
|
Output top N-best hypotheses in a stack as a recognition result, and free all hypotheses. In Julius/Julian, the sentence candidates found at the 2nd pass will be pushed to the "result stack" instead of immediate output. After recognition is over (in case the number of found sentences reaches the number specified by "-n", or search has been terminated in other reason), the top N sentence candidates in the stack will be output as a final result (where N should be specified by "-output"). After then, all the hypotheses in the stack will be freed.
Definition at line 1011 of file search_bestfirst_main.c. Referenced by wchmm_fbs(). |
|
Main function to perform stack decoding of the 2nd search pass.
Definition at line 1083 of file search_bestfirst_main.c. Referenced by main_recognition_loop(). |
|
Dummy NEXTWORD data for short-pause insertion handling. Definition at line 861 of file search_bestfirst_main.c. |