srch.h
Go to the documentation of this file.
1 /* -*- c-basic-offset: 4; indent-tabs-mode: nil -*- */
2 /* ====================================================================
3  * Copyright (c) 1999-2004 Carnegie Mellon University. All rights
4  * reserved.
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions
8  * are met:
9  *
10  * 1. Redistributions of source code must retain the above copyright
11  * notice, this list of conditions and the following disclaimer.
12  *
13  * 2. Redistributions in binary form must reproduce the above copyright
14  * notice, this list of conditions and the following disclaimer in
15  * the documentation and/or other materials provided with the
16  * distribution.
17  *
18  * This work was supported in part by funding from the Defense Advanced
19  * Research Projects Agency and the National Science Foundation of the
20  * United States of America, and the CMU Sphinx Speech Consortium.
21  *
22  * THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ``AS IS'' AND
23  * ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
24  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
25  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY
26  * NOR ITS EMPLOYEES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
27  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
28  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
29  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
30  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
32  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33  *
34  * ====================================================================
35  *
36  */
37 
38 /* srch.h
39  * HISTORY
40  * $Log$
41  * Revision 1.1 2006/04/05 20:27:30 dhdfu
42  * A Great Reorganzation of header files and executables
43  *
44  * Revision 1.2 2006/02/23 15:26:10 arthchan2003
45  * Merged from SPHINX3_5_2_RCI_IRII:
46  *
47  * Summary of changes. Detail could be seen in the comments from the
48  * branches.
49  *
50  * After 6 months, we have two more searches using interface
51  * provided by srch.c. That included an adapted version of Sphinx 2's FSG
52  * search. Also, the original version of flat-lexicon decoding search.
53  *
54  * Second stage search operation is still not properly put in the srch_t
55  * structure. We should create function hooks that allow developer to
56  * put the code more properly than now.
57  *
58  * The interface of srch.c is still not very completed. Things we should
59  * support include switching of AM and MLLR. They are currently
60  * commented.
61  *
62  * Mode 5, the word-dependent tree copies are now fended off from the
63  * users.
64  *
65  * Mode 2, the FSG search are opened. It is not very well tested so the
66  * user will be warned about its nature.
67  *
68  * Revision 1.1.4.15 2006/01/16 20:01:20 arthchan2003
69  * Added Commented code in srch.[ch] for second-stage rescoring. Not used for now.
70  *
71  * Revision 1.1.4.14 2005/11/17 06:36:36 arthchan2003
72  * There are several important changes. 1, acoustic score scale has changed back to put it the search structure. This fixed a bug introduced pre-2005 code branching where only the scaling factor of the last frame. 2, Added a fmt argument of matchseg_write , implemented segmentation output for s2 and ctm file format. matchseg_write also now shared across the flat and tree decoder now. 3, Added Rong's read_seg_hyp_line.
73  *
74  * Revision 1.1.4.13 2005/09/25 19:23:55 arthchan2003
75  * 1, Added arguments for turning on/off LTS rules. 2, Added arguments for turning on/off composite triphones. 3, Moved dict2pid deallocation back to dict2pid. 4, Tidying up the clean up code.
76  *
77  * Revision 1.1.4.12 2005/09/18 01:44:12 arthchan2003
78  * Very boldly, started to support flat lexicon decoding (mode 3) in srch.c. Add log_hypseg. Mode 3 is implemented as srch-one-frame implementation. Scaling doesn't work at this point.
79  *
80  * Revision 1.1.4.11 2005/09/11 23:07:28 arthchan2003
81  * srch.c now support lattice rescoring by rereading the generated lattice in a file. When it is operated, silence cannot be unlinked from the dictionary. This is a hack and its reflected in the code of dag, kbcore and srch. code
82  *
83  * Revision 1.1.4.10 2005/08/02 21:37:28 arthchan2003
84  * 1, Used s3_cd_gmm_compute_sen instead of approx_cd_gmm_compute_sen in mode 2, 4 and 5. This will suppose to make s3.0 to be able to read SCHMM and use them as well. 2, Change srch_gmm_compute_lv2 to accept a two-dimensional array (no_stream*no_coeff) instead of a one dimensional array (no_coeff).
85  *
86  * Revision 1.1.4.9 2005/07/24 19:35:59 arthchan2003
87  * Added GAUDEN_EVAL_WINDOW in srch.h. Assuming this is property of a search.
88  *
89  * Revision 1.1.4.8 2005/07/24 01:39:26 arthchan2003
90  * Added srch_on_srch_frame_lv[12] in the search abstraction routine. This will allow implementation just provide the search for one frame without supplying all function pointer in the standard abstraction.
91  *
92  * Revision 1.1.4.7 2005/07/22 03:41:05 arthchan2003
93  * 1, (Incomplete) Add function pointers for flat foward search. Notice implementation is not yet filled in. 2, adding log_hypstr and log_hyp_detailed. It is sphinx 3.0 version of matchwrite. Add it to possible code merge.
94  *
95  * Revision 1.1.4.6 2005/07/17 05:54:55 arthchan2003
96  * replace vithist_dag_write_header with dag_write_header
97  *
98  * Revision 1.1.4.5 2005/07/13 18:46:39 arthchan2003
99  * Re-included srch_fsg.h
100  *
101  * Revision 1.1.4.4 2005/07/07 02:37:39 arthchan2003
102  * 1, Changed names of srchmode* functions to srch_mode*, 2, complete srch_mode_index_to_str, 3, Remove srch_rescoring and ask implementation to call these "rescoring functions" themselves. The reason is rescoring is not as universal as I would think in the general search. I think search implementer should be the one who decide whether rescoring is one part of their search algorithms
103  *
104  * Revision 1.1.4.3 2005/07/04 07:18:49 arthchan2003
105  * Disabled support of FSG. Added comments for srch_utt_begin and srch_utt_end.
106  *
107  * Revision 1.1.4.2 2005/07/03 23:04:55 arthchan2003
108  * 1, Added srchmode_str_to_index, 2, called the deallocation routine of the search implementation layer in srch_uninit
109  *
110  * Revision 1.1.4.1 2005/06/28 07:03:01 arthchan2003
111  * Added read_fsg operation as one method. Currently, it is still not clear how it should iteract with lm
112  *
113  * Revision 1.1 2005/06/22 02:24:42 arthchan2003
114  * Log. A search interface implementation are checked in. I will call
115  * srch_t to be search abstraction or search mechanism from now on. The
116  * major reason of separating with the search implementation routine
117  * (srch_*.[ch]) is that search is something that people could come up
118  * with thousands of ways to implement.
119  *
120  * Such a design shows a certain sense of defiance of conventional ways
121  * of designing speech recognition. Namely, **always** using generic
122  * graph as the grandfather ancester of every search lattice. This could
123  * 1) break a lot of legacy optimization code. 2) could be slow depends
124  * on the implementation.
125  *
126  * The current design only specify the operations that are supposed to be
127  * generic in every search (or atomic search operations (ASOs)).
128  * Ideally, users only need to implement the interface to make the code
129  * work for another search.
130  *
131  * From this point of view, the current check-in still have some
132  * fundamental flaws. For example, the communication mechanism between
133  * different atomic search operations are not clearly defined. Scores are
134  * now computed and put into structures of ascr. (ascr has no clear
135  * interface to outside world). This is something we need to improve.
136  *
137  * Revision 1.18 2005/06/16 04:59:10 archan
138  * Sphinx3 to s3.generic, a gentle-refactored version of Dave's change in senone scale.
139  *
140  * Revision 1.17 2005/06/10 03:40:57 archan
141  * 1, Fixed doxygen documentation of srch.h, 2, eliminate srch.h C-style functions. 3, Start to fend off the users for using mode 5. We are ready to merge the code.
142  *
143  * Revision 1.16 2005/06/10 03:01:50 archan
144  * Fixed file_open.
145  *
146  * Revision 1.15 2005/06/09 21:03:33 archan
147  * Update srch.h and srch_debug.c such that include files doesn't depend on explicitly specified directory name. Rather it would be taken care by -I option in Makefile.am
148  *
149  * Revision 1.14 2005/05/11 06:10:38 archan
150  * Code for lattice and back track pointer table dumping is now wrapped in reg_result_dump. The function is shared across mode 4 and mode 5. Possibly later for mode 3 and mode 6 as well.
151  *
152  * Revision 1.13 2005/05/11 00:18:45 archan
153  * Add comments on srch.h and srch_time_switch_tree.h and srch_debug.h on how things work. A very detail comment is added in srch.h to describe how generally srch_t is interacting with other parts of the code.
154  *
155  * Revision 1.12 2005/05/04 05:15:25 archan
156  * reverted the last change, seems to be not working because of compilation issue. Try not to deal with it now.
157  *
158  * Revision 1.1 2005/05/04 04:46:04 archan
159  * Move srch.c and srch.h to search. More and more this type of refactoring will be done in future
160  *
161  * Revision 1.10 2005/05/03 04:09:09 archan
162  * Implemented the heart of word copy search. For every ci-phone, every word end, a tree will be allocated to preserve its pathscore. This is different from 3.5 or below, only the best score for a particular ci-phone, regardless of the word-ends will be preserved at every frame. The graph propagation will not collect unused word tree at this point. srch_WST_propagate_wd_lv2 is also as the most stupid in the century. But well, after all, everything needs a start. I will then really get the results from the search and see how it looks.
163  *
164  * Revision 1.9 2005/04/25 19:22:47 archan
165  * Refactor out the code of rescoring from lexical tree. Potentially we want to turn off the rescoring if we need.
166  *
167  * Revision 1.8 2005/04/22 04:22:36 archan
168  * Add gmm_wrap, this will share code across op_mode 4 and op_mode 5. Also it also separate active senone selection into a different process. I hope this is the final step before making the WST search works. At the current stage, the code of mode-5 looks very much alike mode-4. This is intended because in Prototype 4, tail sharing will be used to reduce memory.
169  *
170  * Revision 1.7 2005/04/21 23:50:26 archan
171  * Some more refactoring on the how reporting of structures inside kbcore_t is done, it is now 50% nice. Also added class-based LM test case into test-decode.sh.in. At this moment, everything in search mode 5 is already done. It is time to test the idea whether the search can really be used.
172  *
173  * Revision 1.6 2005/04/20 03:42:55 archan
174  * srch.c now is the only of the master search driver. When there is any change in the **interaction** of different blocks, srch.c should be changed first. Then the search implenetation, such as srch_time_switch_tree.c
175  *
176  * Revision 1.5 2005/03/30 01:22:47 archan
177  * Fixed mistakes in last updates. Add
178  *
179  *
180  * 17-Mar-2005 A. Chan (archan@cs.cmu.edu) at Carnegie Mellon University
181  * 1 Started. This replaced utt.c starting from Sphinx 3.6.
182  */
183 
184 #include <stdio.h>
185 
186 #include <s3types.h>
187 #include <glist.h>
188 #include "dag.h"
189 #include "lm.h"
190 #include "ascr.h"
191 #include "adaptor.h"
192 #include "stat.h"
193 #include "fast_algo_struct.h"
194 #include "kbcore.h"
195 #include "kb.h"
196 
197 
198 /* Mode 1 */
199 #include "srch_allphone.h"
200 
201 /* Mode 2 */
202 #include "srch_fsg.h"
203 
204 /* Mode 3 */
205 #include "srch_flat_fwd.h"
206 
207 /* Mode 4 */
208 #include "srch_time_switch_tree.h"
209 
210 /* Mode 5 */
211 #include "srch_word_switch_tree.h"
212 
213 /* Mode 1368*/
214 #include "srch_do_nothing.h"
215 
216 /* Mode 1369*/
217 #include "srch_debug.h"
218 
219 
220 #include "srch_output.h"
221 
222 #ifndef _SRCH_H_
223 #define _SRCH_H_
224 
225 
226 #ifdef __cplusplus
227 extern "C" {
228 #endif
229 #if 0
230 /* Fool Emacs. */
231 }
232 #endif
233 
234 #define SRCH_SUCCESS 0
235 #define SRCH_FAILURE 1
236 
250 #define OPERATION_ALIGN 0
256 #define OPERATION_ALLPHONE 1
258 #define OPERATION_GRAPH 2
262 #define OPERATION_FLATFWD 3
269 #define OPERATION_TST_DECODE 4
276 #define OPERATION_WST_DECODE 5
283 #define OPERATION_EVANDRO_MODE 6
290 #define OPERATION_DAVID_MODE 7
302 #define OPERATION_ARTHUR_MODE 8
310 #define OPERATION_YITAO_MODE 9
315 #define OPERATION_RAVI_MODE 10
326 #define OPERATION_STEVE_MODE 88
337 #define OPERATION_DO_NOTHING 1368
343 #define OPERATION_DEBUG 1369
350 #define GRAPH_STRUCT_FLAT 0
351 #define GRAPH_STRUCT_TST 1
352 #define GRAPH_STRUCT_WST 2
353 #define GRAPH_STRUCT_GENGRAPH 3
354 #define GRAPH_STRUCT_PHMM 4
355 
356 #define GMM_STRUCT_CDHMM 0
357 #define GMM_STRUCT_SCHMM 1
358 
359 
360 #define GAUDEN_EVAL_WINDOW 8 /*Moving window length when frames are
361  considered as blocks, currently used in
362  3.0 family of tools. */
363 
364 #define DFLT_UTT_SIZE 5000
365 #define DFLT_NUM_SEGS 200
369 /* \struct grp_str_t
370  */
371 typedef struct {
372  void *graph_struct;
373  int32 graph_type;
374 }grp_str_t;
375 
376 
377 
529 typedef struct srch_funcs_s {
530  /*
531  Function pointers that perform the operations. Every mode will
532  set these pointers at the beginning of the search.
533  */
534 
536  int (*init)(kb_t *kb,
537  void* srch_struct
538  );
539 
541  int (*uninit)(
542  void* srch_struct
543  );
545  int (*utt_begin)(
546  void* srch_struct
547  );
548 
550  int (*utt_end)(
551  void* srch_struct
552  );
554  int (*decode)(
555  void* srch_struct
556  );
557 
559  int (*set_lm)(
560  void* srch_struct,
561  const char *lmname
562  );
563 
565  int (*add_lm)(void* srch_struct,
566  lm_t* lm,
567  const char *lmname
568  );
569 
571  int (*delete_lm)(void* srch_struct,
572  const char *lmname
573  );
574 
576 #if 0
577  word_fsg_t* (*read_fsgfile)(void* srch_struct,
578  const char* fsgname
580  );
581 #endif
582  /* The 4 operations that require switching during the approximate search process */
586  int (*gmm_compute_lv1)(void* srch_struct,
587  float32 *feat,
588  int32 frmno_lp1,
589  int32 frmno_lp2
590  );
591 
592 
593  /* The level 1 search functions are not yet fully used. Not all of them are defined nowWhen fast
594  match is needed. We will need them more.
595  */
596  int (*one_srch_frame_lv1)(void* srch_struct
597  );
598 
599  int (*hmm_compute_lv1)(void* srch_struct);
600  int (*eval_beams_lv1)(void* srch_struct);
601  int (*propagate_graph_ph_lv1)(void* srch_struct);
602  int (*propagate_graph_wd_lv1)(void* srch_struct);
603 
604  /* The 4 operations that require switching during the detail search process */
609  int (*gmm_compute_lv2)(void* srch_struct,
610  float32 **feat,
611  int32 time
612  );
614 
619  int (*one_srch_frame_lv2)(void* srch_struct
620  );
621 
622 
624  int (*hmm_compute_lv2)(void* srch_struct,
625  int32 frmno
626  );
627 
629  int (*eval_beams_lv2)(void* srch_struct
630  );
631 
633  int (*propagate_graph_ph_lv2)(void* srch_struct,
634  int32 frmno
635  );
636 
638  int (*propagate_graph_wd_lv2)(void* srch_struct,
639  int32 frmno
640  );
641 
643  int (*rescoring) (void* srch_struct,
644  int32 frmno
645  );
646 
647  int (*frame_windup) (void * srch_struct, int32 frmno);
648  int (*compute_heuristic) (void * srch_struct, int32 win_efv);
649  int (*shift_one_cache_frame) (void *srch_struct,int32 win_efv);
650  int (*select_active_gmm) (void *srch_struct);
651 
652 
660  glist_t (*gen_hyp) (void * srch_struct
661  );
662 
669  dag_t* (*gen_dag) (void* srch_struct,
670  glist_t hyp
671  );
672 
676  int (*dump_vithist)(void * srch_struct
677  );
678 
682  glist_t (*bestpath_impl)(void *srch_struct,
683  dag_t *dag
684  );
689  int (*dag_dump) (void * srch_struct,
690  dag_t *dag
691  );
692 
696  glist_t (*nbest_impl)(void *srch_struct,
697  dag_t *dag
698  );
699 
701  void *nothing;
702 } srch_funcs_t;
704 typedef struct srch_s {
708  srch_funcs_t *funcs;
709 
710  grp_str_t* grh;
711  int op_mode;
712  stat_t *stat;
713  char *uttid;
714  char *uttfile;
716  /*
717  These variables control the logistic of a search operation. The
718  are global to all different search modes.
719  */
720  int32 cache_win;
721  int32 cache_win_strt;
723  int32 senscale;
725  int32 *ascale;
728  int32 ascale_sz;
729  int32 num_frm;
731  int32 *segsz;
732  int32 segsz_sz;
734  int32 num_segs;
740  /*
741  Auxillary Structures for the search.
742  */
743  int32 exit_id;
745  dag_t *dag;
747  /* ARCHAN: Various pruning beams, put them together such that it looks more logical. */
748  ascr_t *ascr;
749  beam_t *beam;
750  fast_gmm_t *fastgmm;
751  pl_t *pl;
752  adapt_am_t * adapt_am;
753  kbcore_t *kbc;
756  FILE *matchfp;
757  FILE *matchsegfp;
759  FILE *hmmdumpfp;
761  /* FIXME, duplicated with fwd_dbg_t */
762  int32 hmm_dump_sf;
763  int32 hmm_dump_ef;
764 }srch_t;
765 
785 int32 srch_mode_str_to_index(const char* mode_str);
786 
792 char* srch_mode_index_to_str(int32 index);
793 
795 /* The following are C-style method for srch structure. In theory,
796  users could used both C-style and function pointer style to access
797  functionalities of the code. However, we recommend developers to use
798  the C-style functions because 1) it won't scare people that match, 2)
799  it is more consistent with other modules in sphinx 3.
800 */
801 
819 srch_t* srch_init(kb_t *kb,
820  int32 op_mode
821  );
822 
828 void srch_report(srch_t* srch
829  );
830 
838 int32 srch_utt_begin(srch_t* srch
839  );
845 int32 srch_utt_decode_blk(srch_t* srch,
846  float ***block_feat,
847  int32 block_nfeatvec,
848  int32 *curfrm
849  );
850 
854 int32 srch_utt_end(srch_t* srch
855  );
856 
858 int32 srch_uninit(srch_t* srch
859  );
860 
864 glist_t srch_get_hyp(srch_t *srch
865  );
866 
872 dag_t *srch_get_dag(srch_t *srch);
873 
874 
876 void reg_result_dump (srch_t* s,
877  int32 id
878  );
882 void write_bstsenscr(FILE *fp,
883  int32 numframe,
884  int32* scale
885  );
886 
887 
890 int32 srch_set_lm(srch_t* srch,
891  const char *lmname
892  );
893 
895 int32 srch_delete_lm(srch_t* srch,
896  const char *lmname
897  );
898 
899 #if 0 /*Tentative: but not yet implemented */
900 int32 srch_set_am(void);
901 
903 int32 srch_add_am(void);
904 
906 int32 srch_delete_am(void);
907 
909 int32 srch_add_lm(void);
910 
911 
913 int32 srch_set_mllr(void);
914 
916 int32 srch_add_mllr(void);
917 
919 int32 srch_delete_mllr(void);
920 
922 int32 srch_set_lamdafn(void);
923 
925 int32 srch_add_lamdafn(void);
926 
928 int32 srch_delete_lamdafn(void);
929 
931 int32 srch_add_words_to_dict(void);
932 
933 #endif /* End not implemented */
934 
935 #ifdef __cplusplus
936 }
937 #endif
938 
939 
940 #endif /*_SRCH_H_ */
int(* utt_begin)(void *srch_struct)
Definition: srch.h:629
srch_t * srch_init(kb_t *kb, int32 op_mode)
A wrapper for all adaptation operations in Sphinx 3.X including MLLR and MAP.
Definition: adaptor.h:119
File that implement various structure for fast algorithms. fast_algo_struct implement beam_t...
int(* frame_windup)(void *srch_struct, int32 frmno)
Definition: srch.h:731
Definition: srch.h:613
Wrapper function of speaker adaptation.
Structure that contains all parameters for phoneme lookahead.
Definition: fast_algo_struct.h:173
int(* eval_beams_lv1)(void *srch_struct)
Definition: srch.h:684
Definition: word_fsg.h:187
void write_bstsenscr(FILE *fp, int32 numframe, int32 *scale)
Definition: kb.h:156
int(* decode)(void *srch_struct)
Definition: srch.h:638
kb core structures, the structure that stores parameters for s3.X search
Structure that contains all beam parameters for beam pruning in Viterbi algorithm.
Definition: fast_algo_struct.h:149
int(* one_srch_frame_lv2)(void *srch_struct)
Definition: srch.h:703
int(* init)(kb_t *kb, void *srch_struct)
Definition: srch.h:620
int(* rescoring)(void *srch_struct, int32 frmno)
Definition: srch.h:727
implementation of search debug mode.
dag_t * srch_get_dag(srch_t *srch)
The wrapper structure for all statistics in sphinx 3.x.
int(* hmm_compute_lv1)(void *srch_struct)
Definition: srch.h:683
struct srch_funcs_s srch_funcs_t
Definition: srch.h:788
int32 srch_uninit(srch_t *srch)
int32 srch_delete_lm(srch_t *srch, const char *lmname)
int32 srch_utt_end(srch_t *srch)
implementation of search that does nothing.
glist_t srch_get_hyp(srch_t *srch)
void * nothing
Definition: srch.h:785
Definition: ascr.h:99
Structure that contains all parameter related to 4-Level Fast GMM computation.
Definition: fast_algo_struct.h:256
Definition: srch.h:455
int(* gmm_compute_lv2)(void *srch_struct, float32 **feat, int32 time)
Definition: srch.h:693
Implementation of word-switching tree search.
int(* dump_vithist)(void *srch_struct)
Definition: srch.h:760
int32 srch_utt_begin(srch_t *srch)
int(* gmm_compute_lv1)(void *srch_struct, float32 *feat, int32 frmno_lp1, int32 frmno_lp2)
Definition: srch.h:670
void reg_result_dump(srch_t *s, int32 id)
int(* add_lm)(void *srch_struct, lm_t *lm, const char *lmname)
Definition: srch.h:649
Structure to hold all statistics in Sphinx 3.x.
Definition: stat.h:101
Size definition of semantically units. Common for both s3 and s3.X decoder.
The global wrapper structure for all variables in 3.X search. We may want to use it for sphinx 3...
int(* compute_heuristic)(void *srch_struct, int32 win_efv)
Definition: srch.h:732
#define S3DECODER_EXPORT
Definition: sphinx3_export.h:15
S3DECODER_EXPORT int32 srch_utt_decode_blk(srch_t *srch, float ***block_feat, int32 block_nfeatvec, int32 *curfrm)
int(* propagate_graph_ph_lv2)(void *srch_struct, int32 frmno)
Definition: srch.h:717
int(* utt_end)(void *srch_struct)
Definition: srch.h:634
S3DECODER_EXPORT int32 srch_set_lm(srch_t *srch, const char *lmname)
int(* dag_dump)(void *srch_struct, dag_t *dag)
Definition: srch.h:773
int(* set_lm)(void *srch_struct, const char *lmname)
Definition: srch.h:643
int(* delete_lm)(void *srch_struct, const char *lmname)
Definition: srch.h:655
int(* propagate_graph_wd_lv1)(void *srch_struct)
Definition: srch.h:686
glist_t(* gen_hyp)(void *srch_struct)
Definition: srch.h:744
data structure for dag. Adapted from s3_dag.h in s3.5
The language model. All unigrams are read into memory on initialization. Bigrams and trigrams read in...
Wrapper to hold senone scores.
int32 srch_mode_str_to_index(const char *mode_str)
Definition: dag.h:204
int(* shift_one_cache_frame)(void *srch_struct, int32 win_efv)
Definition: srch.h:733
void srch_report(srch_t *srch)
Definition: kbcore.h:134
int(* one_srch_frame_lv1)(void *srch_struct)
Definition: srch.h:680
char * srch_mode_index_to_str(int32 index)
int(* select_active_gmm)(void *srch_struct)
Definition: srch.h:734
int(* uninit)(void *srch_struct)
Definition: srch.h:625
int(* eval_beams_lv2)(void *srch_struct)
Definition: srch.h:713
int(* hmm_compute_lv2)(void *srch_struct, int32 frmno)
Definition: srch.h:708
int(* propagate_graph_wd_lv2)(void *srch_struct, int32 frmno)
Definition: srch.h:722
int(* propagate_graph_ph_lv1)(void *srch_struct)
Definition: srch.h:685
Language model.
glist_t(* bestpath_impl)(void *srch_struct, dag_t *dag)
Definition: srch.h:766
struct srch_s srch_t
glist_t(* nbest_impl)(void *srch_struct, dag_t *dag)
Definition: srch.h:780