fsg_psubtree.h File Reference
#include <stdio.h>
#include <cmd_ln.h>
#include <logmath.h>
#include "s3types.h"
#include "word_fsg.h"
#include "fsg.h"
#include "hmm.h"
#include "dict.h"
#include "mdef.h"
Go to the source code of this file.
Classes |
struct | fsg_pnode_ctxt_t |
struct | fsg_pnode_s |
| an fsg node. All transitions (words) out of any given FSG state represented are by a phonetic prefix lextree (except for epsilon or null transitions; they are not part of the lextree). Lextree leaf nodes represent individual FSG transitions, so no sharing is allowed at the leaf nodes. The FSG transition probs are distributed along the lextree: the prob at a node is the max of the probs of all leaf nodes (and, hence, FSG transitions) reachable from that node. More...
|
Defines |
#define | FSG_PNODE_CTXT_BVSZ 2 |
#define | fsg_pnode_leaf(p) ((p)->leaf) |
#define | fsg_pnode_logs2prob(p) ((p)->logs2prob) |
#define | fsg_pnode_succ(p) ((p)->next.succ) |
#define | fsg_pnode_fsglink(p) ((p)->next.fsglink) |
#define | fsg_pnode_sibling(p) ((p)->sibling) |
#define | fsg_pnode_hmmptr(p) (&((p)->hmm)) |
#define | fsg_pnode_ci_ext(p) ((p)->ci_ext) |
#define | fsg_pnode_ppos(p) ((p)->ppos) |
#define | fsg_pnode_leaf(p) ((p)->leaf) |
#define | fsg_pnode_ctxt(p) ((p)->ctxt) |
#define | fsg_pnode_add_ctxt(p, c) ((p)->ctxt.bv[(c)>>5] |= (1 << ((c)&0x001f))) |
Typedefs |
typedef struct fsg_pnode_s | fsg_pnode_t |
Functions |
fsg_pnode_t * | fsg_psubtree_init (hmm_context_t *ctx, word_fsg_t *fsg, int32 from_state, fsg_pnode_t **alloc_head, cmd_ln_t *config, logmath_t *logmath) |
void | fsg_psubtree_free (fsg_pnode_t *alloc_head) |
void | fsg_psubtree_dump (fsg_pnode_t *alloc_head, FILE *fp, dict_t *dict, mdef_t *mdef) |
int | fsg_psubtree_pnode_enter (fsg_pnode_t *pnode, int32 score, int32 frame, int32 bpidx) |
void | fsg_psubtree_pnode_deactivate (fsg_pnode_t *pnode) |
void | fsg_pnode_add_all_ctxt (fsg_pnode_ctxt_t *ctxt) |
uint32 | fsg_pnode_ctxt_sub (fsg_pnode_ctxt_t *src, fsg_pnode_ctxt_t *sub) |
Define Documentation
#define fsg_pnode_add_ctxt |
( |
p, |
|
|
c |
|
) |
((p)->ctxt.bv[(c)>>5] |= (1 << ((c)&0x001f))) |
#define fsg_pnode_ci_ext |
( |
p |
|
) |
((p)->ci_ext) |
#define fsg_pnode_ctxt |
( |
p |
|
) |
((p)->ctxt) |
#define FSG_PNODE_CTXT_BVSZ 2 |
#define fsg_pnode_fsglink |
( |
p |
|
) |
((p)->next.fsglink) |
#define fsg_pnode_hmmptr |
( |
p |
|
) |
(&((p)->hmm)) |
#define fsg_pnode_leaf |
( |
p |
|
) |
((p)->leaf) |
#define fsg_pnode_leaf |
( |
p |
|
) |
((p)->leaf) |
#define fsg_pnode_logs2prob |
( |
p |
|
) |
((p)->logs2prob) |
#define fsg_pnode_ppos |
( |
p |
|
) |
((p)->ppos) |
#define fsg_pnode_sibling |
( |
p |
|
) |
((p)->sibling) |
#define fsg_pnode_succ |
( |
p |
|
) |
((p)->next.succ) |
Typedef Documentation
Function Documentation
Free the given lextree. alloc_head: head of linear list of allocated nodes updated by fsg_psubtree_init().
Build the phone lextree for all transitions out of state from_state. Return the root node of this tree. Also, return a linear linked list of all allocated fsg_pnode_t nodes in *alloc_head (for memory management purposes).
- Parameters:
-
| fsg | A word fsg |
| from_state | from which state to initalize |
void fsg_psubtree_pnode_deactivate |
( |
fsg_pnode_t * |
pnode |
) |
|
int fsg_psubtree_pnode_enter |
( |
fsg_pnode_t * |
pnode, |
|
|
int32 |
score, |
|
|
int32 |
frame, |
|
|
int32 |
bpidx | |
|
) |
| | |