Julius 4.2
|
00001 00023 /* 00024 * Copyright (c) 1991-2011 Kawahara Lab., Kyoto University 00025 * Copyright (c) 2000-2005 Shikano Lab., Nara Institute of Science and Technology 00026 * Copyright (c) 2005-2011 Julius project team, Nagoya Institute of Technology 00027 * All rights reserved 00028 */ 00029 00030 #include <sent/stddefs.h> 00031 #include <sent/htk_hmm.h> 00032 00041 boolean 00042 guess_if_cd_hmm(HTK_HMM_INFO *hmminfo) 00043 { 00044 HMM_Logical *dt; 00045 int rnum, lnum, totalnum; 00046 00047 /* check if there is a logical HMM whose name includes either HMM_RC_DLIM 00048 or HMM_LC_DLIM */ 00049 rnum = lnum = totalnum = 0; 00050 for (dt = hmminfo->lgstart; dt; dt = dt->next) { 00051 if (strstr(dt->name, HMM_RC_DLIM) != NULL) rnum++; 00052 if (strstr(dt->name, HMM_LC_DLIM) != NULL) lnum++; 00053 totalnum++; 00054 } 00055 if (rnum > 0) { 00056 if (lnum == 0) { 00057 jlog("Warning: guess_cdHMM: cannot handle right-context dependency correctly\n"); 00058 return(FALSE); 00059 } else { 00060 return(TRUE); 00061 } 00062 } 00063 return(FALSE); 00064 }