00001
00034
00035
00036
00037
00038
00039
00040
00041 #ifndef __SENT_SEARCH_H__
00042 #define __SENT_SEARCH_H__
00043
00054 typedef struct __nextword__ {
00055 WORD_ID id;
00056 #ifdef USE_NGRAM
00057 LOGPROB lscore;
00058 #else
00059 int next_state;
00060 boolean can_insert_sp;
00061 #endif
00062 TRELLIS_ATOM *tre;
00063 } NEXTWORD;
00064
00065 #ifdef VISUALIZE
00066
00074 typedef struct __popnode__ {
00075 TRELLIS_ATOM *tre;
00076 LOGPROB score;
00077 struct __popnode__ *last;
00078 struct __popnode__ *next;
00079 } POPNODE;
00080 #endif
00081
00082 #ifdef GRAPHOUT
00083 #define FANOUTSTEP 7
00084
00085
00093 typedef struct __word_graph__ {
00094 WORD_ID wid;
00095 int lefttime;
00096 int righttime;
00097 LOGPROB fscore_head;
00098 LOGPROB fscore_tail;
00099 LOGPROB gscore_head;
00100 LOGPROB gscore_tail;
00101 #ifdef USE_NGRAM
00102 LOGPROB lscore;
00103 #endif
00104 #ifdef CM_SEARCH
00105 LOGPROB cmscore;
00106 #endif
00107 struct __word_graph__ **leftword;
00108 int leftwordnum;
00109 int leftwordmaxnum;
00110 struct __word_graph__ **rightword;
00111 int rightwordnum;
00112 int rightwordmaxnum;
00113 struct __word_graph__ *next;
00114 boolean mark;
00115 int id;
00116 boolean saved;
00117 #ifdef GRAPHOUT_DYNAMIC
00118 boolean purged;
00119 #endif
00120 } WordGraph;
00121 #endif
00122
00131 typedef struct __node__ {
00132 struct __node__ *next;
00133 struct __node__ *prev;
00134 boolean endflag;
00135 WORD_ID seq[MAXSEQNUM];
00136 short seqnum;
00137 LOGPROB score;
00138 short bestt;
00139 short estimated_next_t;
00140 LOGPROB *g;
00141 #ifdef MULTIPATH_VERSION
00142 LOGPROB final_g;
00143 #endif
00144 #ifdef USE_DFA
00145 int state;
00146 #endif
00147 TRELLIS_ATOM *tre;
00148
00149 #ifndef PASS2_STRICT_IWCD
00150
00151
00152 LOGPROB *g_prev;
00153 #endif
00154 HMM_Logical *last_ph;
00155 #ifdef MULTIPATH_VERSION
00156 boolean last_ph_sp_attached;
00157 #endif
00158 #ifdef USE_NGRAM
00159 LOGPROB lscore;
00160 LOGPROB totallscore;
00161 #endif
00162 #ifdef CONFIDENCE_MEASURE
00163 #ifdef CM_MULTIPLE_ALPHA
00164 LOGPROB cmscore[MAXSEQNUM][100];
00165 #else
00166 LOGPROB cmscore[MAXSEQNUM];
00167 #endif
00168 #endif
00169 #ifdef VISUALIZE
00170 POPNODE *popnode;
00171 #endif
00172 #ifdef GRAPHOUT
00173 #ifdef GRAPHOUT_PRECISE_BOUNDARY
00174 short *wordend_frame;
00175 LOGPROB *wordend_gscore;
00176 #endif
00177 WordGraph *prevgraph;
00178 WordGraph *lastcontext;
00179 #ifndef GRAPHOUT_PRECISE_BOUNDARY
00180 LOGPROB tail_g_score;
00181 #endif
00182 #endif
00183 } NODE;
00184
00185
00186
00187
00188
00189
00190
00191
00192
00193
00194
00195
00196
00197
00198
00199
00200
00201
00202
00203
00204
00205
00206
00207
00208
00209
00210
00211
00212
00213
00214
00215
00216
00217 #endif