Julius 4.2
|
00001 00035 /* 00036 * Copyright (c) 1991-2011 Kawahara Lab., Kyoto University 00037 * Copyright (c) 2000-2005 Shikano Lab., Nara Institute of Science and Technology 00038 * Copyright (c) 2005-2011 Julius project team, Nagoya Institute of Technology 00039 * All rights reserved 00040 */ 00041 00042 #ifndef __J_SEARCH_H__ 00043 #define __J_SEARCH_H__ 00044 00055 typedef struct __nextword__ { 00056 WORD_ID id; 00057 LOGPROB lscore; 00058 int next_state; 00059 boolean can_insert_sp; 00060 TRELLIS_ATOM *tre; 00061 } NEXTWORD; 00062 00063 #ifdef VISUALIZE 00064 00072 typedef struct __popnode__ { 00073 TRELLIS_ATOM *tre; 00074 LOGPROB score; 00075 struct __popnode__ *last; 00076 struct __popnode__ *next; 00077 } POPNODE; 00078 #endif /* VISUALIZE */ 00079 00088 typedef struct __node__ { 00089 struct __node__ *next; 00090 struct __node__ *prev; 00091 boolean endflag; 00092 WORD_ID seq[MAXSEQNUM]; 00093 short seqnum; 00094 LOGPROB score; 00095 short bestt; 00096 short estimated_next_t; 00097 LOGPROB *g; 00098 LOGPROB final_g; 00099 int state; 00100 TRELLIS_ATOM *tre; 00101 00102 #ifndef PASS2_STRICT_IWCD 00103 /* for inter-word context dependency, the last phone on previous word 00104 need to be calculated later */ 00105 LOGPROB *g_prev; 00106 #endif 00107 HMM_Logical *last_ph; 00108 boolean last_ph_sp_attached; 00109 LOGPROB lscore; 00110 LOGPROB totallscore; 00111 #ifdef CONFIDENCE_MEASURE 00112 #ifdef CM_MULTIPLE_ALPHA 00113 LOGPROB cmscore[MAXSEQNUM][100]; 00114 #else 00115 LOGPROB cmscore[MAXSEQNUM]; 00116 #endif /* CM_MULTIPLE_ALPHA */ 00117 #endif /* CONFIDENCE_MEASURE */ 00118 #ifdef VISUALIZE 00119 POPNODE *popnode; 00120 #endif 00121 #ifdef GRAPHOUT_PRECISE_BOUNDARY 00122 short *wordend_frame; 00123 LOGPROB *wordend_gscore; 00124 #endif 00125 WordGraph *prevgraph; 00126 WordGraph *lastcontext; 00127 #ifndef GRAPHOUT_PRECISE_BOUNDARY 00128 LOGPROB tail_g_score; 00129 #endif 00130 00131 struct __recogprocess__ *region; 00132 00133 } NODE; 00134 00135 /* 00136 HOW SCORES ARE CALCULATED: 00137 00138 0 bestt T-1 00139 |-h(n)---->|<------------g(n)--------------| 00140 ============================================================== 00141 |\ | 00142 ..... ..... 00143 <word trellis> 00144 | \estimated_next_t | =backward trellis 00145 --------------------\------------------------------------| (1st pass) 00146 | \ | 00147 seq[seqnum-1] | \_ | 00148 | \bestt | 00149 =========================+==================================================== 00150 | \ |<-g[0..T-1] 00151 | \ | 00152 seq[seqnum-2] | \__ | 00153 | \ | 00154 --------------------------------\------------------------| 00155 (last_ph)| \__ | 00156 |_ _ _ _ _ _ _ _ _ _ _\ _ _ _ _ _ _ _ _ _ _| 00157 seq[seqnum-3] | \______ |<--g_prev[0..T-1] 00158 | \___ | 00159 | \ | 00160 -------------------------------------------------\-------| <forward trellis> 00161 ...... ...... (2nd pass) 00162 00163 | \_| 00164 =============================================================== 00165 */ 00166 00167 #endif /* __J_SEARCH_H__ */