#include <julius.h>
Include dependency graph for ngram_decode.c:
Go to the source code of this file.
Functions | |
static int | compare_nw (NEXTWORD **a, NEXTWORD **b) |
static NEXTWORD * | search_nw (NEXTWORD **nw, WORD_ID w, int num) |
static void | set_word_context (WORD_ID *cseq, int n, WORD_INFO *winfo) |
static int | pick_backtrellis_words (BACKTRELLIS *bt, WORD_INFO *winfo, NGRAM_INFO *ngram, NEXTWORD **nw, int oldnum, NODE *hypo, short t) |
Extract next word candidates from word trellis. | |
int | get_backtrellis_words (BACKTRELLIS *bt, WORD_INFO *winfo, NGRAM_INFO *ngram, NEXTWORD **nw, NODE *hypo, short tm, short t_end) |
Look for the next word candidates on the word trellis near the specified time frame. | |
int | limit_nw (NEXTWORD **nw, NODE *hypo, int num) |
int | ngram_firstwords (NEXTWORD **nw, int peseqlen, int maxnw, WORD_INFO *winfo, BACKTRELLIS *bt) |
Return the set of initial word hypotheses at the beginning. | |
int | ngram_nextwords (NODE *hypo, NEXTWORD **nw, int maxnw, NGRAM_INFO *ngram, WORD_INFO *winfo, BACKTRELLIS *bt) |
Return the list of next word candidate. | |
boolean | ngram_acceptable (NODE *hypo, WORD_INFO *winfo) |
Variables | |
static WORD_ID | cnword [2] |
Last two non-transparent words. | |
static int | cnnum |
Num of found non-transparent words (<=2). | |
static int | last_trans |
Num of skipped transparent words. |
Given a partial sentence hypothesis, it first estimate the beginning frame of the hypothesis based on the word trellis. Then the words in the word trellis around the estimated frame are extracted from the word trellis. They will be returned with their N-gram probabilities.
In Julius, ngram_firstwords(), ngram_nextwords() and ngram_acceptable() are called from main search function wchmm_fbs(). In Julian, corresponding functions in dfa_decode.c will be used instead.
Definition in file ngram_decode.c.
|
qsort callback function to sort next word candidates by their word ID.
Definition at line 71 of file ngram_decode.c. Referenced by get_backtrellis_words(). |
|
Find a word from list of next word candidates.
Definition at line 101 of file ngram_decode.c. Referenced by pick_backtrellis_words(). |
|
Set last two non-transparent words in the given word sequence and set them to cnword.
Definition at line 147 of file ngram_decode.c. Referenced by pick_backtrellis_words(). |
|
Extract next word candidates from word trellis. This function extracts the list of trellis words whose word end has survived in the word trellis at the specified frame. The N-gram probabilities of them are then computed and added to the current next word candidates data.
Definition at line 205 of file ngram_decode.c. Referenced by get_backtrellis_words(). |
|
Look for the next word candidates on the word trellis near the specified time frame. This function builds a list of next word candidates by looking up the word trellis at specified frame, with lookup_range frame margin. If the same words exists in the near frames, only the one nearest to the specified frame will be chosen.
Definition at line 314 of file ngram_decode.c. Referenced by ngram_nextwords(). |
|
Remove words in the nextword list which should not be expanded.
Definition at line 396 of file ngram_decode.c. Referenced by ngram_nextwords(). |
|
Return the set of initial word hypotheses at the beginning. on N-gram based recogntion, the initial hypothesis is fixed to the tail silence word. Exception is that, in short-pause segmentation mode, the initial hypothesis will be chosen from survived words on the last input frame in the first pass.
Definition at line 467 of file ngram_decode.c. Referenced by wchmm_fbs(). |
|
Return the list of next word candidate. Given a partial sentence hypothesis "hypo", it returns the list of next word candidates. Actually, it extracts from word trellis the list of words whose word-end node has survived near the estimated beginning-of-word frame of last word "hypo->estimated_next_t", and store them to "nw" with their N-gram probabilities.
Definition at line 553 of file ngram_decode.c. Referenced by wchmm_fbs(). |
|
Return whether the given partial hypothesis is acceptable as a sentence and can be treated as a final search candidate. In N-gram mode, it checks whether the last word is the beginning-of-sentence silence (silhead).
Definition at line 606 of file ngram_decode.c. Referenced by wchmm_fbs(). |