fsg_lextree.c File Reference

The collection of all the lextrees for the entire FSM. More...

`#include <stdio.h>`
`#include <string.h>`
`#include <assert.h>`
`#include <sphinxbase/ckd_alloc.h>`
`#include <sphinxbase/err.h>`
`#include "fsg_lextree.h"`

Go to the source code of this file.

## Data Structures

struct | fsg_glist_linklist_t

## Macros

#define | __FSG_DBG__ 0

## Typedefs

typedef struct fsg_glist_linklist_t | fsg_glist_linklist_t

## Functions

fsg_lextree_t * | fsg_lextree_init (fsg_model_t *fsg, dict_t *dict, dict2pid_t *d2p, bin_mdef_t *mdef, hmm_context_t *ctx, int32 wip, int32 pip)
| Create, initialize, and return a new phonetic lextree for the given FSG.
void | fsg_lextree_dump (fsg_lextree_t *lextree, FILE *fp)
| Print an FSG lextree to a file for debugging.
void | fsg_lextree_free (fsg_lextree_t *lextree)
| Free lextrees for an FSG.
void | fsg_glist_linklist_free (fsg_glist_linklist_t *glist)
void | fsg_pnode_add_all_ctxt (fsg_pnode_ctxt_t *ctxt)
| Set all flags on in the given context bitvector.
uint32 | fsg_pnode_ctxt_sub_generic (fsg_pnode_ctxt_t *src, fsg_pnode_ctxt_t *sub)
| Generic variant for arbitrary size.
void | fsg_psubtree_dump_node (fsg_lextree_t *tree, fsg_pnode_t *node, FILE *fp)
void | fsg_psubtree_pnode_deactivate (fsg_pnode_t *pnode)
| Mark the given pnode as inactive (for search).

## Detailed Description

The collection of all the lextrees for the entire FSM.

Author
  M K Ravishankar rkm@c.nosp@m.s.cm.nosp@m.u.edu
  Bhiksha Raj bhiks.nosp@m.ha@c.nosp@m.s.cmu.nosp@m..edu

Definition in file fsg_lextree.c.

## Macro Definition Documentation

## __FSG_DBG__

#define __FSG_DBG__ 0

Definition at line 53 of file fsg_lextree.c.

## Function Documentation

## fsg_glist_linklist_free()

void fsg_glist_linklist_free | ( | fsg_glist_linklist_t * | glist | ) |

Definition at line 308 of file fsg_lextree.c.

## fsg_lextree_dump()

void fsg_lextree_dump | ( | fsg_lextree_t * | lextree,
|  | FILE * | fp
| ) |  |

Print an FSG lextree to a file for debugging.

Definition at line 273 of file fsg_lextree.c.

References fsg_lextree_s::fsg.

Referenced by fsg_lextree_init().

## fsg_lextree_free()

void fsg_lextree_free | ( | fsg_lextree_t * | lextree | ) |

Free lextrees for an FSG.

Definition at line 286 of file fsg_lextree.c.

References fsg_lextree_s::fsg, fsg_lextree_s::lc, and fsg_lextree_s::rc.

## fsg_lextree_init()

fsg_lextree_t * fsg_lextree_init | ( | fsg_model_t * | fsg,
|  | dict_t * | dict,
|  | dict2pid_t * | d2p,
|  | bin_mdef_t * | mdef,
|  | hmm_context_t * | ctx,
|  | int32 | wip,
|  | int32 | pip
| ) |  |

Create, initialize, and return a new phonetic lextree for the given FSG.

Definition at line 215 of file fsg_lextree.c.

References fsg_lextree_s::ctx, fsg_lextree_s::d2p, fsg_lextree_s::dict, fsg_lextree_s::fsg, fsg_lextree_dump(), and fsg_lextree_s::mdef.

## fsg_pnode_add_all_ctxt()

void fsg_pnode_add_all_ctxt | ( | fsg_pnode_ctxt_t * | ctxt | ) |

Set all flags on in the given context bitvector.

Definition at line 328 of file fsg_lextree.c.

## fsg_pnode_ctxt_sub_generic()

uint32 fsg_pnode_ctxt_sub_generic | ( | fsg_pnode_ctxt_t * | src,
|  | fsg_pnode_ctxt_t * | sub
| ) |  |

Generic variant for arbitrary size.

Definition at line 336 of file fsg_lextree.c.

## fsg_psubtree_dump_node()

void fsg_psubtree_dump_node | ( | fsg_lextree_t * | tree,
|  | fsg_pnode_t * | node,
|  | FILE * | fp
| ) |  |

Definition at line 760 of file fsg_lextree.c.

## fsg_psubtree_pnode_deactivate()

void fsg_psubtree_pnode_deactivate | ( | fsg_pnode_t * | pnode | ) |

Mark the given pnode as inactive (for search).

Definition at line 832 of file fsg_lextree.c.