libsent/src/voca/voca_load_htkdict.c

HTK形式の単語辞書データの読み込み. [詳細]

#include <sent/stddefs.h>
#include <sent/vocabulary.h>
#include <sent/htk_hmm.h>
voca_load_htkdict.cのインクルード依存関係図

ソースコードを見る。

マクロ定義

#define PHONEMELEN_STEP   30
 Memory allocation step for phoneme sequence.

関数

char * cycle_triphone (char *p)
char * cycle_triphone_flush ()
static void add_to_error (WORD_INFO *winfo, char *name)
static void callback_list_error (void *x)
static void list_error (WORD_INFO *winfo)
static void set_maxwn (WORD_INFO *winfo)
static void set_maxwlen (WORD_INFO *winfo)
boolean voca_load_htkdict (FILE *fp, WORD_INFO *winfo, HTK_HMM_INFO *hmminfo, boolean ignore_tri_conv)
boolean voca_load_htkdict_fd (int fd, WORD_INFO *winfo, HTK_HMM_INFO *hmminfo, boolean ignore_tri_conv)
boolean voca_load_htkdict_sd (int sd, WORD_INFO *winfo, HTK_HMM_INFO *hmminfo, boolean ignore_tri_conv)
boolean voca_append_htkdict (char *entry, WORD_INFO *winfo, HTK_HMM_INFO *hmminfo, boolean ignore_tri_conv)
boolean voca_load_htkdict_line (char *buf, int vnum, WORD_INFO *winfo, HTK_HMM_INFO *hmminfo, boolean do_conv, boolean *ok_flag)
boolean voca_mono2tri (WORD_INFO *winfo, HTK_HMM_INFO *hmminfo)
 Convert whole words in word dictionary to word-internal triphone.
void voca_append (WORD_INFO *dstinfo, WORD_INFO *srcinfo, int coffset, int woffset)

変数

static char buf [MAXLINELEN]
 Local work area for input text processing.
static char bufbak [MAXLINELEN]
 Local work area for debug message.
static char trbuf [3][20]
 Local buffer for triphone convertion.
static char chbuf [30]
 Another local buffer for triphone convertion.
static char nophone [1]
 Local buffer to indicate 'no phone'.
static int trp_l
 Triphone cycle index.
static int trp
 Triphone cycle index.
static int trp_r
 Triphone cycle index.

説明

HTK形式の単語辞書データの読み込み.

作者:
Akinobu LEE
日付:
Fri Feb 18 19:43:06 2005

トライフォンモデルを用いる場合,モノフォン表記からトライフォンへの 変換およびモデルの存在チェックはこの辞書読み込み時に行なわれます.

Revision
1.4

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


関数

char* cycle_triphone ( char *  p  ) 

Return string of triphone name composed from last 3 call.

引数:
p [in] next phone string
戻り値:
the composed triphone name, or NULL on end.

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

参照元 cycle_triphone_flush(), new_str2phseq(), voca_load_htkdict_line(), と voca_mono2tri().

char* cycle_triphone_flush (  ) 

Flush the triphone buffer and return the last biphone.

戻り値:
the composed last bi-phone name.

voca_load_htkdict.c125 行で定義されています。

参照元 new_str2phseq(), voca_load_htkdict_line(), と voca_mono2tri().

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_htkdict.c137 行で定義されています。

参照元 voca_load_htkdict_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_htkdict.c160 行で定義されています。

参照元 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_htkdict.c172 行で定義されています。

参照元 voca_append_htkdict(), voca_load_htkdict(), voca_load_htkdict_fd(), と voca_load_htkdict_sd().

static void set_maxwn ( WORD_INFO winfo  )  [static]

Parse a word dictionary and set the maximum state length per word.

引数:
winfo [i/o]

voca_load_htkdict.c185 行で定義されています。

参照元 voca_append(), voca_append_htkdict(), voca_load_htkdict(), voca_load_htkdict_fd(), と voca_load_htkdict_sd().

static void set_maxwlen ( WORD_INFO winfo  )  [static]

Parse the word dictionary to set the maximum word length.

引数:
winfo [i/o] word dictionary data

voca_load_htkdict.c207 行で定義されています。

参照元 voca_append(), voca_append_htkdict(), voca_load_htkdict(), voca_load_htkdict_fd(), と voca_load_htkdict_sd().

boolean voca_load_htkdict ( FILE *  fp,
WORD_INFO winfo,
HTK_HMM_INFO hmminfo,
boolean  ignore_tri_conv 
)

Top function to read word dictionary 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.
ignore_tri_conv [in] TRUE if triphone conversion is ignored
戻り値:
TRUE on success, FALSE on any error word.

voca_load_htkdict.c229 行で定義されています。

参照元 init_voca().

boolean voca_load_htkdict_fd ( int  fd,
WORD_INFO winfo,
HTK_HMM_INFO hmminfo,
boolean  ignore_tri_conv 
)

Top function to read word dictionary via file descriptor.

引数:
fd [in] file descriptor
winfo [out] pointer to word dictionary to store the read data.
hmminfo [in] HTK HMM definition data. if NULL, phonemes are ignored.
ignore_tri_conv [in] TRUE if triphone conversion is ignored
戻り値:
TRUE on success, FALSE on any error word.

voca_load_htkdict.c269 行で定義されています。

boolean voca_load_htkdict_sd ( int  sd,
WORD_INFO winfo,
HTK_HMM_INFO hmminfo,
boolean  ignore_tri_conv 
)

Top function to read word dictionary via socket descriptor.

引数:
sd [in] socket descriptor
winfo [out] pointer to word dictionary to store the read data.
hmminfo [in] HTK HMM definition data. if NULL, phonemes are ignored.
ignore_tri_conv [in] TRUE if triphone conversion is ignored
戻り値:
TRUE on success, FALSE on any error word.

voca_load_htkdict.c308 行で定義されています。

boolean voca_append_htkdict ( char *  entry,
WORD_INFO winfo,
HTK_HMM_INFO hmminfo,
boolean  ignore_tri_conv 
)

Append a single entry to the existing word dictionary.

引数:
entry [in] dictionary entry string to be appended.
winfo [out] pointer to word dictionary to append the data.
hmminfo [in] HTK HMM definition data. if NULL, phonemes are ignored.
ignore_tri_conv [in] TRUE if triphone conversion is ignored
戻り値:
TRUE on success, FALSE on any error word.

voca_load_htkdict.c347 行で定義されています。

参照元 initialize_dict().

boolean voca_load_htkdict_line ( char *  buf,
int  vnum,
WORD_INFO winfo,
HTK_HMM_INFO hmminfo,
boolean  do_conv,
boolean ok_flag 
)

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 [in] current number of words in winfo
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.
戻り値:
FALSE if buf == "DICEND", else TRUE will be returned.

voca_load_htkdict.c384 行で定義されています。

参照元 voca_append_htkdict(), voca_load_htkdict(), voca_load_htkdict_fd(), と voca_load_htkdict_sd().

boolean voca_mono2tri ( WORD_INFO winfo,
HTK_HMM_INFO hmminfo 
)

Convert whole words in word dictionary to word-internal triphone.

Normally triphone conversion will be performed directly when reading dictionary file. This function is for post conversion only.

引数:
winfo [i/o] word dictionary information
hmminfo [in] HTK HMM definition
戻り値:
TRUE on success, FALSE on failure.

voca_load_htkdict.c596 行で定義されています。

参照元 final_fusion().

void voca_append ( WORD_INFO dstinfo,
WORD_INFO srcinfo,
int  coffset,
int  woffset 
)

Append one word dictionary to other, for multiple grammar handling. Assumes that the same HMM definition is used on both word dictionary.

引数:
dstinfo [i/o] word dictionary
srcinfo [in] word dictionary to be appended to dst
coffset [in] category id offset in dst where the new data should be stored
woffset [in] word id offset in dst where the new data should be stored

voca_load_htkdict.c637 行で定義されています。

参照元 multigram_build_append().


Juliusに対してTue Sep 22 00:15:37 2009に生成されました。  doxygen 1.6.0