Julius 4.2
|
00001 00022 /* 00023 * Copyright (c) 1991-2011 Kawahara Lab., Kyoto University 00024 * Copyright (c) 2000-2005 Shikano Lab., Nara Institute of Science and Technology 00025 * Copyright (c) 2005-2011 Julius project team, Nagoya Institute of Technology 00026 * All rights reserved 00027 */ 00028 00029 #include <sent/stddefs.h> 00030 #include <sent/htk_hmm.h> 00031 00032 extern char *rdhmmdef_token; 00033 00039 static void 00040 regtree_read(FILE *fp) 00041 { 00042 int num; 00043 00044 read_token(fp); 00045 NoTokErr("missing REGTREE terminal node num"); 00046 num = atoi(rdhmmdef_token); 00047 read_token(fp); 00048 for(;;) { 00049 if (currentis("NODE")) { /* skip 3 arguments */ 00050 read_token(fp); 00051 read_token(fp); 00052 read_token(fp); 00053 read_token(fp); 00054 } else if (currentis("TNODE")) { /* skip 2 argument */ 00055 read_token(fp); 00056 read_token(fp); 00057 read_token(fp); 00058 } else { 00059 break; 00060 } 00061 } 00062 } 00063 00071 void 00072 def_regtree_macro(char *name, FILE *fp, HTK_HMM_INFO *hmm) 00073 { 00074 if (currentis("~r")) { /* macro reference */ 00075 /* ignore silently */ 00076 } else if (currentis("REGTREE")) { /* definition */ 00077 /* do not define actually, just read forward till next macro */ 00078 regtree_read(fp); 00079 } else { 00080 rderr("no regtree data\n"); 00081 } 00082 return; 00083 }