#include <julius.h>
Include dependency graph for wchmm.c:
Go to the source code of this file.
Functions | |
WCHMM_INFO * | wchmm_new () |
static void | wchmm_init (WCHMM_INFO *wchmm) |
static void | wchmm_extend (WCHMM_INFO *wchmm) |
void | wchmm_free (WCHMM_INFO *w) |
static int | compare_wseq (WORD_ID *widx1, WORD_ID *widx2) |
static void | wchmm_sort_idx_by_wseq (WORD_INFO *winfo, WORD_ID *windex, WORD_ID bgn, WORD_ID len) |
static int | wchmm_check_match (WORD_INFO *winfo, int i, int j) |
static void | add_wacc (WCHMM_INFO *wchmm, int node, LOGPROB a, int arc) |
static void | wchmm_link_hmm (WCHMM_INFO *wchmm, int from_node, int to_node, HTK_HMM_Trans *tinfo) |
static void | wchmm_link_subword (WCHMM_INFO *wchmm, int from_word, int from_seq, int to_word, int to_seq) |
static void | wchmm_duplicate_state (WCHMM_INFO *wchmm, int node, int word) |
static void | wchmm_duplicate_leafnode (WCHMM_INFO *wchmm) |
static void | wchmm_add_word (WCHMM_INFO *wchmm, int word, int matchlen, int matchword) |
static void | wchmm_index_ststart (WCHMM_INFO *wchmm) |
static void | wchmm_calc_wordend_arc (WCHMM_INFO *wchmm) |
static int | compare_prob (LOGPROB *a, LOGPROB *b) |
static LOGPROB | get_nbest_uniprob (WORD_INFO *winfo, int n) |
void | build_wchmm2 (WCHMM_INFO *wchmm) |
void | print_wchmm_info (WCHMM_INFO *wchmm) |
Variables | |
static int | dupcount = 0 |
Number of duplicated nodes (for debug only) If defined, do wchmm size estimation (for debug only). | |
static WORD_INFO * | local_winfo |
Temporary work area for sort callbacks. | |
static int | separated_word_count |
Number of words actually separated (linearlized) from the tree. |
Note that the word "wchmm" in the source code is a synonim of "tree lexicon".
Definition in file wchmm.c.
|
Allocate a new tree lexicon structure.
Definition at line 70 of file wchmm.c. Referenced by final_fusion(). |
|
Initialize content of a lexicon tree.
Definition at line 103 of file wchmm.c. Referenced by build_wchmm2(). |
|
Expand state-related area in a tree lexicon by MAXWCNSTEP.
Definition at line 156 of file wchmm.c. Referenced by wchmm_add_word(), and wchmm_duplicate_state(). |
|
Free all data in a tree lexicon.
|
|
qsort function to sort words by their phoneme sequence.
Definition at line 292 of file wchmm.c. Referenced by wchmm_sort_idx_by_wseq(). |
|
Sort word IDs in windex[bgn..bgn+len-1] by their phoneme sequence order.
Definition at line 341 of file wchmm.c. Referenced by build_wchmm2(). |
|
Compare two words from word head per phoneme to see how many phones can be shared among the two.
Definition at line 430 of file wchmm.c. Referenced by build_wchmm2(). |
|
Add a transition arc between two nodes on the tree lexicon
Definition at line 463 of file wchmm.c. Referenced by wchmm_add_word(), wchmm_duplicate_state(), and wchmm_link_hmm(). |
|
Add a transition from end node of a phone to start node of another phone.
Definition at line 592 of file wchmm.c. Referenced by wchmm_link_subword(). |
|
Connect two phonemes in tree lexicon.
Definition at line 641 of file wchmm.c. Referenced by wchmm_add_word(). |
|
Isolation of word-end nodes for homophones: duplicate the word-end state, link as the same as original, and make it the new word-end node of the given new word.
Definition at line 696 of file wchmm.c. Referenced by wchmm_duplicate_leafnode(). |
|
Scan the whole lexicon tree to find already registered homophones, and make word-end nodes of the found homophones isolated from others.
Definition at line 810 of file wchmm.c. Referenced by build_wchmm2(). |
|
Add a new word to the lexicon tree. The longest matched word in the current lexicon tree and the length of the matched phoneme from the word head should be specified to tell where to insert the new word to the tree.
Definition at line 891 of file wchmm.c. Referenced by build_wchmm2(). |
|
Inspect the whole lexicon tree to generate list of word head states for inter-word transition computation.
Definition at line 1329 of file wchmm.c. Referenced by build_wchmm2(). |
|
Scan the lexicon tree to make list of emission probability from the word end state.
Definition at line 1367 of file wchmm.c. Referenced by build_wchmm2(). |
|
qsort callback function to sort unigram values.
Definition at line 1407 of file wchmm.c. Referenced by get_nbest_uniprob(). |
|
Get the Nth-best unigram probability from all words.
Definition at line 1433 of file wchmm.c. Referenced by build_wchmm2(). |
|
Build a tree lexicon from given word dictionary and language model. This function does the same job as build_wchmm(), but it is much faster because finding of the longest matched word to an adding word is done by first sorting all the words in the dictoinary by their phoneme sequence order. This function will be used instead of build_wchmm() by default.
Definition at line 1682 of file wchmm.c. Referenced by final_fusion(). |
|
Output some specifications of the tree lexicon (size etc.) to stdout.
Definition at line 1958 of file wchmm.c. Referenced by print_info(). |