julius/search.h

説明を見る。
00001 
00034 /*
00035  * Copyright (c) 1991-2006 Kawahara Lab., Kyoto University
00036  * Copyright (c) 2000-2005 Shikano Lab., Nara Institute of Science and Technology
00037  * Copyright (c) 2005-2006 Julius project team, Nagoya Institute of Technology
00038  * All rights reserved
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  /* USE_DFA */
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 /* VISUALIZE */
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 /* GRAPHOUT */
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   /* for inter-word context dependency, the last phone on previous word
00153      need to be calculated later */
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 /* USE_NGRAM */
00164 #ifdef CONFIDENCE_MEASURE
00165 #ifdef CM_MULTIPLE_ALPHA
00166   LOGPROB cmscore[MAXSEQNUM][100]; 
00167 #else
00168   LOGPROB cmscore[MAXSEQNUM];   
00169 #endif /* CM_MULTIPLE_ALPHA */
00170 #endif /* CONFIDENCE_MEASURE */
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 /* GRAPHOUT */
00185 } NODE;
00186 
00187 /*
00188   HOW SCORES ARE CALCULATED:
00189   
00190               0         bestt                            T-1
00191               |-h(n)---->|<------------g(n)--------------|
00192 ==============================================================
00193               |\                                         |
00194               .....                                  .....  
00195                                                             <word trellis>
00196               |    \estimated_next_t                     |  =backward trellis
00197 --------------------\------------------------------------|  (1st pass)
00198               |      \                                   |   
00199 seq[seqnum-1] |       \_                                 |   
00200               |         \bestt                           |   
00201 =========================+====================================================
00202               |           \                              |<-g[0..T-1]
00203               |            \                             |   
00204 seq[seqnum-2] |             \__                          |
00205               |                \                         |
00206 --------------------------------\------------------------|
00207      (last_ph)|                  \__                     |
00208               |_ _ _ _ _ _ _ _ _ _ _\ _ _ _ _ _ _ _ _ _ _|
00209 seq[seqnum-3] |                      \______             |<--g_prev[0..T-1]
00210               |                             \___         |  
00211               |                                 \        |  
00212 -------------------------------------------------\-------|  <forward trellis>
00213               ......                                ......  (2nd pass)
00214 
00215               |                                        \_|
00216 ===============================================================       
00217 */
00218 
00219 #endif /* __SENT_SEARCH_H__ */

Juliusに対してTue Dec 26 16:19:28 2006に生成されました。  doxygen 1.5.0