111 #include <hash_table.h>
116 #define DICT_INC_SZ 4096
176 const char *dictfile,
177 const char *fillerfile,
225 #define dict_size(d) ((d)->n_word)
226 #define dict_basewid(d,w) ((d)->word[w].basewid)
227 #define dict_wordstr(d,w) ((d)->word[w].word)
228 #define dict_nextalt(d,w) ((d)->word[w].alt)
229 #define dict_pronlen(d,w) ((d)->word[w].pronlen)
230 #define dict_pron(d,w,p) ((d)->word[w].ciphone[p])
231 #define dict_filler_start(d) ((d)->filler_start)
232 #define dict_filler_end(d) ((d)->filler_end)
233 #define dict_startwid(d) ((d)->startwid)
234 #define dict_finishwid(d) ((d)->finishwid)
235 #define dict_silwid(d) ((d)->silwid)
236 #define dict_first_phone(d,w) ((d)->word[w].ciphone[0])
237 #define dict_second_last_phone(d,w) ((d)->word[w].ciphone[(d)->word[w].pronlen - 2])
238 #define dict_last_phone(d,w) ((d)->word[w].ciphone[(d)->word[w].pronlen - 1])
241 #define S3_START_WORD "<s>"
242 #define S3_FINISH_WORD "</s>"
243 #define S3_SILENCE_WORD "<sil>"
244 #define S3_UNKNOWN_WORD "<UNK>"
int32 n_comp
Definition: dict.h:134
strcture for storing the model definition.
Definition: mdef.h:184
s3wid_t _dict_basewid(dict_t *d, s3wid_t w)
s3wid_t * comp_head
Definition: dict.h:157
int32 s3wid_t
Definition: s3types.h:136
char * word
Definition: dict.h:129
hash_table_t * pht
Definition: dict.h:148
lts_t * lts_rules
Definition: dict.h:164
int32 n_word
Definition: dict.h:154
S3DECODER_EXPORT void dict_free(dict_t *d)
const char * dict_ciphone_str(dict_t *d, s3wid_t wid, int32 pos)
s3wid_t * comp
Definition: dict.h:138
mdef_t * mdef
Definition: dict.h:147
int32 filler_end
Definition: dict.h:156
s3wid_t startwid
Definition: dict.h:160
s3wid_t silwid
Definition: dict.h:162
s3wid_t alt
Definition: dict.h:132
int16 s3cipid_t
Definition: s3types.h:110
Size definition of semantically units. Common for both s3 and s3.X decoder.
char ** ciphone_str
Definition: dict.h:149
a structure for one dictionary word.
Definition: dict.h:128
#define S3DECODER_EXPORT
Definition: sphinx3_export.h:15
s3wid_t basewid
Definition: dict.h:133
s3wid_t finishwid
Definition: dict.h:161
a structure for a dictionary.
Definition: dict.h:146
int32 filler_start
Definition: dict.h:155
S3DECODER_EXPORT dict_t * dict_init(mdef_t *mdef, const char *dictfile, const char *fillerfile, const char comp_sep, int useLTS, int breport)
S3DECODER_EXPORT int32 dict_filler_word(dict_t *d, s3wid_t w)
s3wid_t dict_wids2compwid(dict_t *d, s3wid_t *wid, int32 len)
int32 max_words
Definition: dict.h:153
s3cipid_t * ciphone
Definition: dict.h:130
dictword_t * word
Definition: dict.h:151
S3DECODER_EXPORT s3wid_t dict_wordid(dict_t *d, const char *word)
int32 n_ciphone
Definition: dict.h:150
s3wid_t _dict_nextalt(dict_t *d, s3wid_t wid)
int32 pronlen
Definition: dict.h:131
s3wid_t dict_add_word(dict_t *d, char *word, s3cipid_t *p, int32 np)
char * _dict_wordstr(dict_t *d, s3wid_t wid)
hash_table_t * ht
Definition: dict.h:152
void dict_report(dict_t *d)
int32 dict_word2basestr(char *word)