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   HMM_Logical *headphone;       
00108   HMM_Logical *tailphone;       
00109   struct __word_graph__ **leftword; 
00110   int leftwordnum;              
00111   int leftwordmaxnum;           
00112   struct __word_graph__ **rightword; 
00113   int rightwordnum;             
00114   int rightwordmaxnum;          
00115   struct __word_graph__ *next;  
00116   boolean mark;                 
00117   int id;                       
00118   boolean saved;                
00119 #ifdef GRAPHOUT_DYNAMIC
00120   boolean purged;               
00121 #endif
00122 } WordGraph;
00123 #endif 
00124 
00133 typedef struct __node__ {
00134   struct __node__    *next;     
00135   struct __node__    *prev;     
00136   boolean endflag;              
00137   WORD_ID seq[MAXSEQNUM];       
00138   short seqnum;                 
00139   LOGPROB score;                
00140   short bestt;                  
00141   short estimated_next_t;       
00142   LOGPROB *g;                   
00143 #ifdef MULTIPATH_VERSION
00144   LOGPROB final_g;              
00145 #endif
00146 #ifdef USE_DFA
00147   int state;                    
00148 #endif
00149   TRELLIS_ATOM *tre;            
00150   
00151 #ifndef PASS2_STRICT_IWCD
00152   
00153 
00154   LOGPROB *g_prev;              
00155 #endif
00156   HMM_Logical *last_ph;         
00157 #ifdef MULTIPATH_VERSION
00158   boolean last_ph_sp_attached;  
00159 #endif
00160 #ifdef USE_NGRAM
00161   LOGPROB lscore;               
00162   LOGPROB totallscore;          
00163 #endif 
00164 #ifdef CONFIDENCE_MEASURE
00165 #ifdef CM_MULTIPLE_ALPHA
00166   LOGPROB cmscore[MAXSEQNUM][100]; 
00167 #else
00168   LOGPROB cmscore[MAXSEQNUM];   
00169 #endif 
00170 #endif 
00171 #ifdef VISUALIZE
00172   POPNODE *popnode;             
00173 #endif
00174 #ifdef GRAPHOUT
00175 #ifdef GRAPHOUT_PRECISE_BOUNDARY
00176   short *wordend_frame;         
00177   LOGPROB *wordend_gscore;      
00178 #endif
00179   WordGraph *prevgraph;         
00180   WordGraph *lastcontext;       
00181 #ifndef GRAPHOUT_PRECISE_BOUNDARY
00182   LOGPROB tail_g_score;         
00183 #endif
00184 #endif 
00185 } NODE;
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 
00218 
00219 #endif