#include <sent/stddefs.h>
#include <sent/vocabulary.h>
#include <sent/htk_hmm.h>
マクロ定義 | |
| #define | PHONEMELEN_STEP 30 |
| Memory allocation step for phoneme sequence | |
関数 | |
| char * | cycle_triphone (char *p) |
| Return string of triphone name composed from last 3 call. | |
| char * | cycle_triphone_flush () |
| Flush the triphone buffer and return the last biphone. | |
| 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. | |
| void | voca_set_stats (WORD_INFO *winfo) |
| Parse a word dictionary and set the maximum state length per word. | |
| void | voca_load_start (WORD_INFO *winfo, HTK_HMM_INFO *hmminfo, boolean ignore_tri_conv) |
| Start loading a dictionary. | |
| boolean | voca_load_line (char *buf, WORD_INFO *winfo, HTK_HMM_INFO *hmminfo) |
| Load a line from buffer and set parameters to the dictionary. | |
| boolean | voca_load_end (WORD_INFO *winfo) |
| End loading dictionary entries. | |
| 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 (gzip enabled) | |
| boolean | voca_load_htkdict_fp (FILE *fp, WORD_INFO *winfo, HTK_HMM_INFO *hmminfo, boolean ignore_tri_conv) |
| Top function to read word dictionary via normal file pointer. | |
| 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. | |
| boolean | voca_load_htkdict_line (char *buf, WORD_ID *vnum_p, int linenum, 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. | |
| boolean | voca_mono2tri (WORD_INFO *winfo, HTK_HMM_INFO *hmminfo) |
| Convert whole words in word dictionary to word-internal triphone. | |
| boolean | voca_append (WORD_INFO *dstinfo, WORD_INFO *srcinfo, int coffset, int woffset) |
| Append one word dictionary to other, for multiple grammar handling. | |
変数 | |
| 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 | |
トライフォンモデルを用いる場合,モノフォン表記からトライフォンへの 変換およびモデルの存在チェックはこの辞書読み込み時に行なわれます.
voca_load_htkdict.c で定義されています。
| char* cycle_triphone | ( | char * | p | ) |
Return string of triphone name composed from last 3 call.
| p | [in] next phone string |
voca_load_htkdict.c の 80 行で定義されています。
参照元 cycle_triphone_flush()・voca_load_htkdict_line()・voca_load_wordlist_line()・voca_mono2tri().
| char* cycle_triphone_flush | ( | ) |
Flush the triphone buffer and return the last biphone.
voca_load_htkdict.c の 126 行で定義されています。
参照元 voca_load_htkdict_line()・voca_load_wordlist_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.c の 138 行で定義されています。
| 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.c の 161 行で定義されています。
参照元 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.c の 173 行で定義されています。
参照元 voca_load_end().
| void voca_set_stats | ( | WORD_INFO * | winfo | ) |
Parse a word dictionary and set the maximum state length per word.
| winfo | [i/o] |
voca_load_htkdict.c の 186 行で定義されています。
参照元 voca_load_end().
| void voca_load_start | ( | WORD_INFO * | winfo, | |
| HTK_HMM_INFO * | hmminfo, | |||
| boolean | ignore_tri_conv | |||
| ) |
Start loading a dictionary.
See voca_load_htkdict() for an example of using this function.
| winfo | [i/o] dictionary data where the data will be loaded | |
| hmminfo | [in] phoneme HMM definition | |
| ignore_tri_conv | [in] if TRUE, skip triphone conversion while loading |
voca_load_htkdict.c の 228 行で定義されています。
参照元 voca_load_htkdict()・voca_load_htkdict_fp()・voca_load_wordlist()・voca_load_wordlist_fp().
| boolean voca_load_line | ( | char * | buf, | |
| WORD_INFO * | winfo, | |||
| HTK_HMM_INFO * | hmminfo | |||
| ) |
Load a line from buffer and set parameters to the dictionary.
See voca_load_htkdict() for an example of using this function.
| buf | [in] input buffer containing a word entry | |
| winfo | [i/o] word dictionary to append the entry | |
| hmminfo | [in] phoneme HMM definition |
voca_load_htkdict.c の 255 行で定義されています。
参照元 voca_append_htkdict()・voca_load_htkdict()・voca_load_htkdict_fp().
End loading dictionary entries.
It calculates some statistics for the read entries, outputs errors if encountered while the last loading, and returns with status whether an error occured while loading.
| winfo | [i/o] word dictionary just read by voca_load_line() calls |
voca_load_htkdict.c の 284 行で定義されています。
参照元 voca_append_htkdict()・voca_load_htkdict()・voca_load_htkdict_fp()・voca_load_wordlist()・voca_load_wordlist_fp().
| 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 (gzip enabled)
| 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 |
voca_load_htkdict.c の 305 行で定義されています。
参照元 init_voca().
| boolean voca_load_htkdict_fp | ( | FILE * | fp, | |
| WORD_INFO * | winfo, | |||
| HTK_HMM_INFO * | hmminfo, | |||
| boolean | ignore_tri_conv | |||
| ) |
Top function to read word dictionary via normal 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 |
voca_load_htkdict.c の 330 行で定義されています。
| 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 |
voca_load_htkdict.c の 354 行で定義されています。
参照元 initialize_dict().
| boolean voca_load_htkdict_line | ( | char * | buf, | |
| WORD_ID * | vnum_p, | |||
| int | linenum, | |||
| 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_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. |
voca_load_htkdict.c の 374 行で定義されています。
参照元 voca_load_line().
| 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 |
voca_load_htkdict.c の 601 行で定義されています。
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.c の 642 行で定義されています。
参照元 multigram_add_words_to_grammar()・multigram_append_to_global()・multigram_update().
1.5.1