143
143
buf = (char *)mymalloc(strlen(name) + 1);
144
144
strcpy(buf, name);
145
145
if (winfo->errph_root == NULL) {
146
winfo->errph_root = aptree_make_root_node(buf);
146
winfo->errph_root = aptree_make_root_node(buf, &(winfo->mroot));
148
148
match = aptree_search_data(buf, winfo->errph_root);
149
149
if (match == NULL || !strmatch(match, buf)) {
150
aptree_add_entry(buf, buf, match, &(winfo->errph_root));
150
aptree_add_entry(buf, buf, match, &(winfo->errph_root), &(winfo->mroot));
320
* Top function to read word dictionary via file descriptor.
322
* @param fd [in] file descriptor
323
* @param winfo [out] pointer to word dictionary to store the read data.
324
* @param hmminfo [in] HTK %HMM definition data. if NULL, phonemes are ignored.
325
* @param ignore_tri_conv [in] TRUE if triphone conversion is ignored
327
* @return TRUE on success, FALSE on any error word.
330
voca_load_htkdict_fd(int fd, WORD_INFO *winfo, HTK_HMM_INFO *hmminfo, boolean ignore_tri_conv)
334
voca_load_start(winfo, hmminfo, ignore_tri_conv);
335
while(getl_fd(buf, MAXLINELEN, fd) != NULL) {
336
if (voca_load_line(buf, winfo, hmminfo) == FALSE) break;
338
ret = voca_load_end(winfo);
344
* Top function to read word dictionary via socket descriptor.
346
* @param sd [in] socket descriptor
347
* @param winfo [out] pointer to word dictionary to store the read data.
348
* @param hmminfo [in] HTK %HMM definition data. if NULL, phonemes are ignored.
349
* @param ignore_tri_conv [in] TRUE if triphone conversion is ignored
351
* @return TRUE on success, FALSE on any error word.
354
voca_load_htkdict_sd(int sd, WORD_INFO *winfo, HTK_HMM_INFO *hmminfo, boolean ignore_tri_conv)
358
voca_load_start(winfo, hmminfo, ignore_tri_conv);
359
while(getl_sd(buf, MAXLINELEN, sd) != NULL) {
320
* Top function to read word dictionary via normal file pointer.
322
* @param fp [in] file pointer
323
* @param winfo [out] pointer to word dictionary to store the read data.
324
* @param hmminfo [in] HTK %HMM definition data. if NULL, phonemes are ignored.
325
* @param ignore_tri_conv [in] TRUE if triphone conversion is ignored
327
* @return TRUE on success, FALSE on any error word.
330
voca_load_htkdict_fp(FILE *fp, WORD_INFO *winfo, HTK_HMM_INFO *hmminfo, boolean ignore_tri_conv)
334
voca_load_start(winfo, hmminfo, ignore_tri_conv);
335
while(getl_fp(buf, MAXLINELEN, fp) != NULL) {
360
336
if (voca_load_line(buf, winfo, hmminfo) == FALSE) break;
362
338
ret = voca_load_end(winfo);