Julius 4.2
マクロ定義 | 関数 | 変数
libsent/src/voca/voca_load_wordlist.c

孤立単語認識モード用単語リストの読み込み [詳細]

#include <sent/stddefs.h>
#include <sent/vocabulary.h>
#include <sent/htk_hmm.h>

ソースコードを見る。

マクロ定義

#define PHONEMELEN_STEP   30
 Memory allocation step for phoneme sequence.

関数

static void add_to_error (WORD_INFO *winfo, char *name)
 Add a triphone name to the missing error list in WORD_INFO.
static void callback_list_error (void *x)
 Traverse callback function to output a error phone.
static void list_error (WORD_INFO *winfo)
 Output all error phones appeared while readin a word dictionary.
boolean voca_load_word_line (char *buf, WORD_INFO *winfo, HTK_HMM_INFO *hmminfo, char *headphone, char *tailphone, char *contextphone)
 Load a line from buffer and set parameters to the dictionary.
boolean voca_load_wordlist (FILE *fp, WORD_INFO *winfo, HTK_HMM_INFO *hmminfo, char *headphone, char *tailphone, char *contextphone)
 Top function to read word list via text.
boolean voca_load_wordlist_fp (FILE *fp, WORD_INFO *winfo, HTK_HMM_INFO *hmminfo, char *headphone, char *tailphone, char *contextphone)
 Top function to read word list via file pointer.
boolean voca_load_wordlist_line (char *buf, WORD_ID *vnum_p, int linenum, WORD_INFO *winfo, HTK_HMM_INFO *hmminfo, boolean do_conv, boolean *ok_flag, char *headphone, char *tailphone, char *contextphone)
 Sub function to Add a dictionary entry line to the word dictionary.

変数

static char buf [MAXLINELEN]
 Local work area for input text processing.
static char bufbak [MAXLINELEN]
 Local work area for debug message.

説明

孤立単語認識モード用単語リストの読み込み

作者:
Akinobu LEE
日付:
Sun Jul 22 13:29:32 2007
Revision:
1.6

voca_load_wordlist.c で定義されています。


関数

static void add_to_error ( WORD_INFO winfo,
char *  name 
) [static]

Add a triphone name to the missing error list in WORD_INFO.

引数:
winfo[i/o] word dictionary to add the error phone to error list
name[in] phone name to be added

voca_load_wordlist.c56 行で定義されています。

参照元 voca_load_wordlist_line().

static void callback_list_error ( void *  x) [static]

Traverse callback function to output a error phone.

引数:
x[in] error phone string of the node

voca_load_wordlist.c79 行で定義されています。

参照元 list_error().

static void list_error ( WORD_INFO winfo) [static]

Output all error phones appeared while readin a word dictionary.

引数:
winfo[in] word dictionary data

voca_load_wordlist.c91 行で定義されています。

boolean voca_load_word_line ( char *  buf,
WORD_INFO winfo,
HTK_HMM_INFO hmminfo,
char *  headphone,
char *  tailphone,
char *  contextphone 
)

Load a line from buffer and set parameters to the dictionary.

引数:
buf[in] input buffer containing a word entry
winfo[i/o] word dictionary to append the entry
hmminfo[in] phoneme HMM definition
headphone[in] word head silence model name
tailphone[in] word tail silence model name
contextphone[in] silence context name to be used at head and tail
戻り値:
TRUE when successfully read, or FALSE on encountered end of dictionary. When an error occurs, this function will set winfo->ok_flag to FALSE.

voca_load_wordlist.c114 行で定義されています。

参照元 voca_load_wordlist(), と voca_load_wordlist_fp().

boolean voca_load_wordlist ( FILE *  fp,
WORD_INFO winfo,
HTK_HMM_INFO hmminfo,
char *  headphone,
char *  tailphone,
char *  contextphone 
)

Top function to read word list via text.

引数:
fp[in] file pointer
winfo[out] pointer to word dictionary to store the read data.
hmminfo[in] HTK HMM definition data. if NULL, phonemes are ignored.
headphone[in] word head silence model name
tailphone[in] word tail silence model name
contextphone[in] silence context name to be used at head and tail
戻り値:
TRUE on success, FALSE on any error word.

voca_load_wordlist.c142 行で定義されています。

参照元 init_wordlist().

boolean voca_load_wordlist_fp ( FILE *  fp,
WORD_INFO winfo,
HTK_HMM_INFO hmminfo,
char *  headphone,
char *  tailphone,
char *  contextphone 
)

Top function to read word list via file pointer.

引数:
fp[in] file pointer
winfo[out] pointer to word dictionary to store the read data.
hmminfo[in] HTK HMM definition data. if NULL, phonemes are ignored.
headphone[in] word head silence model name
tailphone[in] word tail silence model name
contextphone[in] silence context name to be used at head and tail
戻り値:
TRUE on success, FALSE on any error word.

voca_load_wordlist.c169 行で定義されています。

boolean voca_load_wordlist_line ( char *  buf,
WORD_ID vnum_p,
int  linenum,
WORD_INFO winfo,
HTK_HMM_INFO hmminfo,
boolean  do_conv,
boolean ok_flag,
char *  headphone,
char *  tailphone,
char *  contextphone 
)

Sub function to Add a dictionary entry line to the word dictionary.

引数:
buf[i/o] buffer to hold the input string, will be modified in this function
vnum_p[in] current number of words in winfo
linenum[in] current line number of the input
winfo[out] pointer to word dictionary to append the data.
hmminfo[in] HTK HMM definition data. if NULL, phonemes are ignored.
do_conv[in] TRUE if performing triphone conversion
ok_flag[out] will be set to FALSE if an error occured for this input.
headphone[in] word head silence model name
tailphone[in] word tail silence model name
contextphone[in] silence context name to be used at head and tail
戻り値:
FALSE if buf == "DICEND", else TRUE will be returned.

voca_load_wordlist.c199 行で定義されています。

参照元 voca_load_word_line().