Classes | Macros | Functions
ctxt_table.h File Reference
#include <s3types.h>
#include <prim_type.h>
#include <mdef.h>
#include <dict.h>

Go to the source code of this file.

Classes

struct  xwdssid_t
 cross word triphone model structure More...
 
struct  ctxt_table_t
 

Macros

#define ctxt_table_left_ctxt_ssid(ct, l, b, r)   ((ct)->lcssid[b][r].ssid[ct->lcssid[b][r].cimap[l]])
 
#define ctxt_table_word_int_ssid(ct, wid, wpos)   ((ct)->wwssid[wid][wpos])
 
#define ctxt_table_right_ctxt_ssid(ct, l, b, r)   ((ct)->rcssid[b][l].ssid[ct->rcssid[b][l].cimap[r]])
 
#define ctxt_table_single_phone_ssid(ct, l, b, r)   ((ct)->lrcssid[b][l].ssid[ct->lrcssid[b][l].cimap[r]])
 

Functions

ctxt_table_tctxt_table_init (dict_t *dict, mdef_t *mdef)
 
void ctxt_table_free (ctxt_table_t *ct)
 
void get_rcssid (ctxt_table_t *ct, s3wid_t w, s3ssid_t **ssid, int32 *nssid, dict_t *dict)
 
void get_lcssid (ctxt_table_t *ct, s3wid_t w, s3ssid_t **ssid, int32 *nssid, dict_t *dict)
 
s3cipid_tget_rc_cimap (ctxt_table_t *ct, s3wid_t w, dict_t *dict)
 
s3cipid_tget_lc_cimap (ctxt_table_t *ct, s3wid_t w, dict_t *dict)
 
int32 ct_get_rc_nssid (ctxt_table_t *ct, s3wid_t w, dict_t *dict)
 

Macro Definition Documentation

#define ctxt_table_left_ctxt_ssid (   ct,
  l,
  b,
 
)    ((ct)->lcssid[b][r].ssid[ct->lcssid[b][r].cimap[l]])

Referenced by word_enter().

#define ctxt_table_right_ctxt_ssid (   ct,
  l,
  b,
 
)    ((ct)->rcssid[b][l].ssid[ct->rcssid[b][l].cimap[r]])
#define ctxt_table_single_phone_ssid (   ct,
  l,
  b,
 
)    ((ct)->lrcssid[b][l].ssid[ct->lrcssid[b][l].cimap[r]])

Referenced by word_enter().

#define ctxt_table_word_int_ssid (   ct,
  wid,
  wpos 
)    ((ct)->wwssid[wid][wpos])

Referenced by whmm_transition().

Function Documentation

int32 ct_get_rc_nssid ( ctxt_table_t ct,
s3wid_t  w,
dict_t dict 
)

Get number of right context for the last phone of a word.

Returns
number of right context
Parameters
ctA context table
wWord for query.
dictA dictionary

Referenced by word_enter().

void ctxt_table_free ( ctxt_table_t ct)

Uninitialize a context tableContext Table

ctxt_table_t* ctxt_table_init ( dict_t dict,
mdef_t mdef 
)

Initialize a context table

Parameters
dictA dictionary
mdefA model definition
s3cipid_t* get_lc_cimap ( ctxt_table_t ct,
s3wid_t  w,
dict_t dict 
)

Get the context-independent phone map for the last phone of a parcitular word

Returns
an array of ciphone ID.
Parameters
ctA context table
wA word for query
dictA dictionary

Referenced by word_enter().

void get_lcssid ( ctxt_table_t ct,
s3wid_t  w,
s3ssid_t **  ssid,
int32 *  nssid,
dict_t dict 
)

Get the array of left context senone sequence ID for the first phone.

Parameters
ctA context table
wA word for query
ssidOut: An array of right context SSID
nssidOut: Number of SSID
dictIn: a dictionary
s3cipid_t* get_rc_cimap ( ctxt_table_t ct,
s3wid_t  w,
dict_t dict 
)

Get the context-independent phone map for the last phone of a parcitular word

Returns
an array of ciphone ID.
Parameters
ctA context table
wA word for query
dictA dictionary

Referenced by word_trans().

void get_rcssid ( ctxt_table_t ct,
s3wid_t  w,
s3ssid_t **  ssid,
int32 *  nssid,
dict_t dict 
)

Get the array of right context senone sequence ID for the last phone.

Parameters
ctA context table
wA word for query
ssidOut: An array of right context phone ID
nssidOut: Number of SSID
dictIn: a dictionary

Referenced by whmm_transition().