Classes | Macros | Functions
kbcore.h File Reference

kb core structures, the structure that stores parameters for s3.X search More...

#include <s3types.h>
#include <cmd_ln.h>
#include <logmath.h>
#include "feat.h"
#include "cont_mgau.h"
#include "ms_mgau.h"
#include "s2_semi_mgau.h"
#include "mdef.h"
#include "dict.h"
#include "dict2pid.h"
#include "fillpen.h"
#include "lm.h"
#include "tmat.h"
#include "subvq.h"
#include "gs.h"

Go to the source code of this file.

Classes

struct  kbcore_t
 

Macros

#define kbcore_config(k)   ((k)->config)
 
#define kbcore_fcb(k)   ((k)->fcb)
 
#define kbcore_mdef(k)   ((k)->mdef)
 
#define kbcore_dict(k)   ((k)->dict)
 
#define kbcore_dict2pid(k)   ((k)->dict2pid)
 
#define kbcore_lm(k)   ((k)->lmset ? (k)->lmset->cur_lm : NULL)
 
#define kbcore_fillpen(k)   ((k)->fillpen)
 
#define kbcore_dict2lmwid(k, w)   ((k)->dict2lmwid[w])
 
#define kbcore_mgau(k)   ((k)->mgau)
 
#define kbcore_ms_mgau(k)   ((k)->ms_mgau)
 
#define kbcore_s2_mgau(k)   ((k)->s2_mgau)
 
#define kbcore_svq(k)   ((k)->svq)
 
#define kbcore_gs(k)   ((k)->gs)
 
#define kbcore_tmat(k)   ((k)->tmat)
 
#define kbcore_lmset(k)   ((k)->lmset)
 
#define kbcore_n_mgau(k)
 
#define kbcore_logmath(k)   ((k)->logmath)
 

Functions

S3DECODER_EXPORT kbcore_tNew_kbcore (cmd_ln_t *config)
 
S3DECODER_EXPORT void s3_am_init (kbcore_t *kbc)
 
kbcore_tkbcore_init (cmd_ln_t *config)
 
S3DECODER_EXPORT void kbcore_free (kbcore_t *kbcore)
 
void unlinksilences (lm_t *l, kbcore_t *kbc, dict_t *d)
 
void linksilences (lm_t *l, kbcore_t *kbc, dict_t *d)
 

Detailed Description

kb core structures, the structure that stores parameters for s3.X search

Macro Definition Documentation

◆ kbcore_config

#define kbcore_config (   k)    ((k)->config)

Access macros; not meant for arbitrary use

◆ kbcore_dict

#define kbcore_dict (   k)    ((k)->dict)

◆ kbcore_dict2lmwid

#define kbcore_dict2lmwid (   k,
 
)    ((k)->dict2lmwid[w])

◆ kbcore_dict2pid

#define kbcore_dict2pid (   k)    ((k)->dict2pid)

◆ kbcore_fcb

#define kbcore_fcb (   k)    ((k)->fcb)

◆ kbcore_fillpen

#define kbcore_fillpen (   k)    ((k)->fillpen)

◆ kbcore_gs

#define kbcore_gs (   k)    ((k)->gs)

◆ kbcore_lm

#define kbcore_lm (   k)    ((k)->lmset ? (k)->lmset->cur_lm : NULL)

◆ kbcore_lmset

#define kbcore_lmset (   k)    ((k)->lmset)

◆ kbcore_logmath

#define kbcore_logmath (   k)    ((k)->logmath)

◆ kbcore_mdef

#define kbcore_mdef (   k)    ((k)->mdef)

◆ kbcore_mgau

#define kbcore_mgau (   k)    ((k)->mgau)

◆ kbcore_ms_mgau

#define kbcore_ms_mgau (   k)    ((k)->ms_mgau)

◆ kbcore_n_mgau

#define kbcore_n_mgau (   k)
Value:
((k)->mgau ? mgau_n_mgau((k)->mgau) \
: ((k)->s2_mgau ? (k)->s2_mgau->CdWdPDFMod \
: (k)->ms_mgau->s->n_sen))
#define mgau_n_mgau(g)
Definition: cont_mgau.h:257

◆ kbcore_s2_mgau

#define kbcore_s2_mgau (   k)    ((k)->s2_mgau)

◆ kbcore_svq

#define kbcore_svq (   k)    ((k)->svq)

◆ kbcore_tmat

#define kbcore_tmat (   k)    ((k)->tmat)

Function Documentation

◆ kbcore_free()

S3DECODER_EXPORT void kbcore_free ( kbcore_t kbcore)

free the kbcore

Parameters
kbcoreThe kbcore structure

◆ kbcore_init()

kbcore_t* kbcore_init ( cmd_ln_t *  config)

Initialize one or more of all the major models: pronunciation dictionary, acoustic models, language models. Parameters are taken from the command line (see cmdln_macro.h)

◆ linksilences()

void linksilences ( lm_t l,
kbcore_t kbc,
dict_t d 
)

◆ New_kbcore()

S3DECODER_EXPORT kbcore_t* New_kbcore ( cmd_ln_t *  config)

Create a new kbcore

◆ s3_am_init()

S3DECODER_EXPORT void s3_am_init ( kbcore_t kbc)

Initialize just the acoustic model for kbcore, taking parameters from the global command-line module.

◆ unlinksilences()

void unlinksilences ( lm_t l,
kbcore_t kbc,
dict_t d 
)

Sphinx 3.x tree decoders assume silences are unlinked (set them to BAD_S3WID) before used. Whereas the flat lexicon decoder doesn't have such assumption. These two functions change this behavior. Called in mode 3, 4 and 5 to make sure different code works. FIXME: This is dumb.