124 #ifndef _S3_VITHIST_H_ 125 #define _S3_VITHIST_H_ 191 #define vithist_entry_wid(ve) ((ve)->wid) 194 #define vithist_entry_sf(ve) ((ve)->sf) 197 #define vithist_entry_ef(ve) ((ve)->ef) 200 #define vithist_entry_ascr(ve) ((ve)->ascr) 203 #define vithist_entry_lscr(ve) ((ve)->lscr) 206 #define vithist_entry_score(ve) ((ve)->path.score) 207 #define vithist_entry_pred(ve) ((ve)->path.pred) 208 #define vithist_entry_valid(ve) ((ve)->valid) 258 #define VITHIST_BLKSIZE 16384 259 #define VITHIST_MAXBLKS 256 260 #define VITHIST_ID2BLK(i) ((i) >> 14) 261 #define VITHIST_ID2BLKOFFSET(i) ((i) & 0x00003fff) 266 #define vithist_id2entry(vh,id) ((vh)->entry[VITHIST_ID2BLK(id)] + VITHIST_ID2BLKOFFSET(id)) 269 #define vithist_n_entry(vh) ((vh)->n_entry) 272 #define vithist_bestscore(vh) ((vh)->bestscore) 275 #define vithist_bestvh(vh) ((vh)->bestvh) 278 #define vithist_lms2vh_root(vh,w) ((vh)->lms2vh_root[w]) 281 #define vithist_lwidlist(vh) ((vh)->lwidlist) 284 #define vithist_first_entry(vh,f) ((vh)->frame_start[f]) 287 #define vithist_last_entry(vh,f) ((vh)->frame_start[f+1] - 1) 408 cmd_ln_t *config, logmath_t *logmath);
414 const char *filename,
473 #define LAT_ALLOC_INCR 32768 475 #define LATID2SF(hist,l) (IS_S3LATID(hist->lattice[l].history) ? \ 476 hist->lattice[hist->lattice[l].history].frm + 1 : 0) 511 #define latticehist_n_cand(hist) ((hist)->n_cand) 512 #define latticehist_lat_alloc(hist) ((hist)->lat_alloc) 513 #define latticehist_n_lat_entry(hist) ((hist)->n_lat_entry) 648 int32 endid, cmd_ln_t *config, logmath_t *logmath);
654 const char *filename,
int32 ascr
Definition: vithist.h:182
int32 lat_pscr_rc(latticehist_t *lathist, s3latid_t l, s3wid_t w_rc, ctxt_table_t *ct, dict_t *dict)
int32 n_entry
Definition: vithist.h:242
int32 score
Definition: vithist.h:467
s3wid_t wid
Definition: vithist.h:180
int32 n_ci
Definition: vithist.h:244
int32 ascr
Definition: vithist.h:464
dagnode_t * dagnode
Definition: vithist.h:469
int32 bghist
Definition: vithist.h:245
lattice_t * lattice
Definition: vithist.h:495
dag_t * latticehist_dag_build(latticehist_t *vh, glist_t hyp, dict_t *dict, lm_t *lm, ctxt_table_t *ctxt, fillpen_t *fpen, int32 endid, cmd_ln_t *config, logmath_t *logmath)
int32 n_frm
Definition: vithist.h:243
Definition: vithist.h:238
int32 s3wid_t
Definition: s3types.h:136
int32 vithist_partialutt_end(vithist_t *vh, kbcore_t *kbc)
Filler penalties, penalties for words that do not show up in the main LM.
The temporary header file for sphinx 3 functions.
int32 vithist_utt_end(vithist_t *vh, kbcore_t *kbc)
void vithist_free(vithist_t *vh)
s3latid_t lat_pscr_rc_history(latticehist_t *lathist, s3latid_t l, s3wid_t w_rc, ctxt_table_t *ct, dict_t *dict)
Definition: vithist.h:222
int16 s3frmid_t
Definition: s3types.h:172
void latticehist_free(latticehist_t *lat)
struct lattice_s lattice_t
vh_lmstate_t lmstate
Definition: vithist.h:179
kb core structures, the structure that stores parameters for s3.X search
struct backpointer_s backpointer_t
s3wid_t wid
Definition: vithist.h:460
int32 lat_seg_lscr(latticehist_t *lathist, s3latid_t l, lm_t *lm, dict_t *dict, ctxt_table_t *ct, fillpen_t *fillpen, int32 isCand)
s3lmwid32_t lwid[2]
Definition: vithist.h:164
void vh_lmstate_display(vh_lmstate_t *vhl, dict_t *dict)
Operations on dictionary.
int32 score
Definition: vithist.h:170
glist_t vithist_backtrace(vithist_t *vh, int32 id, dict_t *dict)
union vh_lmstate_u vh_lmstate_t
s3frmid_t frm
Definition: vithist.h:461
int32 lscr
Definition: vithist.h:465
void vithist_prune(vithist_t *vh, dict_t *dict, int32 frm, int32 maxwpf, int32 maxhist, int32 beam)
void latticehist_reset(latticehist_t *lat)
void lattice_entry(latticehist_t *lathist, s3wid_t w, int32 f, int32 score, s3latid_t history, int32 rc, ctxt_table_t *ct, dict_t *dict)
latticehist_t * latticehist_init(int32 init_alloc_size, int32 num_frames)
s3frmid_t sf
Definition: vithist.h:181
int32 lat_alloc
Definition: vithist.h:498
int32 * frame_start
Definition: vithist.h:240
int16 valid
Definition: vithist.h:185
void two_word_history(latticehist_t *lathist, s3latid_t l, s3wid_t *w0, s3wid_t *w1, dict_t *dict)
void vithist_frame_windup(vithist_t *vh, int32 frm, FILE *fp, kbcore_t *kbc)
backpointer_t * rc
Definition: vithist.h:186
Definition: vithist.h:177
s3latid_t lat_final_entry(latticehist_t *lathist, dict_t *dict, int32 curfrm, char *uttid)
vithist_entry_t * ve
Definition: vithist.h:225
int32 wbeam
Definition: vithist.h:248
int32 n_cand
Definition: vithist.h:500
void vithist_report(vithist_t *vh)
int32 vithist_dag_write(vithist_t *vithist, const char *filename, dag_t *dag, lm_t *lm, dict_t *dict)
void vithist_enter(vithist_t *vh, kbcore_t *kbc, vithist_entry_t *tve, int32 comp_rc)
int32 * rcscore
Definition: vithist.h:468
Size definition of semantically units. Common for both s3 and s3.X decoder.
Definition: vithist.h:162
void vithist_entry_display(vithist_entry_t *ve, dict_t *dict)
int32 * bestscore
Definition: vithist.h:250
Definition: vithist.h:459
glist_t children
Definition: vithist.h:226
a structure for a dictionary.
Definition: dict.h:146
int32 vithist_utt_begin(vithist_t *vh, kbcore_t *kbc)
void vithist_utt_reset(vithist_t *vh)
void vithist_rescore(vithist_t *vh, kbcore_t *kbc, s3wid_t wid, int32 ef, int32 score, int32 pred, int32 type, int32 rc)
dag_t * vithist_dag_build(vithist_t *vh, glist_t hyp, dict_t *dict, int32 endid, cmd_ln_t *config, logmath_t *logmath)
int32 fillpen(fillpen_t *f, s3wid_t w)
int32 vhid
Definition: vithist.h:224
int32 * bestvh
Definition: vithist.h:251
Definition: vithist.h:493
void latticehist_dump(latticehist_t *lathist, FILE *fp, dict_t *dict, ctxt_table_t *ct, int32 dumpRC)
void lat_seg_ascr_lscr(latticehist_t *lathist, s3latid_t l, s3wid_t w_rc, int32 *ascr, int32 *lscr, lm_t *lm, dict_t *dict, ctxt_table_t *ct, fillpen_t *fillpen)
glist_t lwidlist
Definition: vithist.h:254
vh_lms2vh_t ** lms2vh_root
Definition: vithist.h:253
s3latid_t history
Definition: vithist.h:462
srch_hyp_t * lattice_backtrace(latticehist_t *lathist, s3latid_t l, s3wid_t w_rc, srch_hyp_t **hyp, lm_t *lm, dict_t *dict, ctxt_table_t *ct, fillpen_t *fillpen)
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...
int32 lscr
Definition: vithist.h:183
Definition: vithist.h:169
int32 n_lat_entry
Definition: vithist.h:499
vithist_t * vithist_init(kbcore_t *kbc, int32 wbeam, int32 bghist, int32 report)
int32 n_rc
Definition: vithist.h:187
int32 s3latid_t
Definition: s3types.h:166
int32 state
Definition: vithist.h:223
uint32 s3lmwid32_t
Definition: s3types.h:149
int32 n_frm
Definition: vithist.h:506
int32 latticehist_dag_write(latticehist_t *lathist, const char *filename, dag_t *dag, lm_t *lm, dict_t *dict, ctxt_table_t *ct, fillpen_t *fillpen)
int32 n_frms_alloc
Definition: vithist.h:505
int32 pred
Definition: vithist.h:171
s3latid_t * frm_latstart
Definition: vithist.h:496
void vithist_dump(vithist_t *vh, int32 frm, kbcore_t *kbc, FILE *fp)
Definition: ctxt_table.h:353
backpointer_t path
Definition: vithist.h:178
struct vh_lmstate_u::@7 lm3g
vithist_entry_t ** entry
Definition: vithist.h:239
int16 type
Definition: vithist.h:184