libsent/src/voca/init_voca.c

説明を見る。
00001 
00017 /*
00018  * Copyright (c) 1991-2006 Kawahara Lab., Kyoto University
00019  * Copyright (c) 2000-2005 Shikano Lab., Nara Institute of Science and Technology
00020  * Copyright (c) 2005-2006 Julius project team, Nagoya Institute of Technology
00021  * All rights reserved
00022  */
00023 
00024 #include <sent/stddefs.h>
00025 #include <sent/htk_hmm.h>
00026 #include <sent/vocabulary.h>
00027 
00039 boolean
00040 init_voca(WORD_INFO *winfo, char *filename, HTK_HMM_INFO *hmminfo, boolean not_conv_tri, boolean force_dict)
00041 {
00042   FILE *fd;
00043 
00044   j_printerr("Reading in dictionary...\n");
00045   if ((fd = fopen_readfile(filename)) == NULL) {
00046     j_printerr("failed to open %s\n",filename);
00047     return(FALSE);
00048   }
00049   if (!voca_load_htkdict(fd, winfo, hmminfo, not_conv_tri)) {
00050     if (force_dict) {
00051       j_printerr("errors are ignored\n");
00052     } else {
00053       j_printerr("error in reading %s: %d words failed out of %d words\n",filename, winfo->errnum, winfo->num);
00054       fclose_readfile(fd);
00055       return(FALSE);
00056     }
00057   }
00058   if (fclose_readfile(fd) == -1) {
00059     j_printerr("close error\n");
00060     return(FALSE);
00061   }
00062 
00063   j_printerr("%d words...done\n", winfo->num);
00064   return(TRUE);
00065 }

Juliusに対してTue Dec 26 16:19:28 2006に生成されました。  doxygen 1.5.0