word_graph.h File Reference

#include <stdio.h>
#include <logmath.h>
#include <glist.h>
#include <s3types.h>
#include <dag.h>
#include <dict.h>
#include <lm.h>

Go to the source code of this file.

Classes

struct  word_graph_link_t
struct  word_graph_node_t
struct  word_graph_t

Defines

#define INVALID_START_FRAME   -1
#define INVALID_START_INDEX   -1
#define OUTLATFMT_SPHINX3   0
#define OUTLATFMT_IBM   1
#define dag_node_mark(d)   d->reachable

Functions

void print_wg (FILE *fp, word_graph_t *wg, dict_t *dict, int32 fmt)
word_graph_tdag_to_wordgraph (dag_t *dag, int32 *senscale, lm_t *lm, dict_t *dict)
void word_graph_dump (char *dir, char *uttfile, char *id, char *latfile_ext, dag_t *dag, dict_t *dict, lm_t *lm, int32 *senscale)
void wordgraph_free (word_graph_t *wg)

Define Documentation

#define dag_node_mark (  )     d->reachable
#define INVALID_START_FRAME   -1
#define INVALID_START_INDEX   -1
#define OUTLATFMT_IBM   1
#define OUTLATFMT_SPHINX3   0

Function Documentation

word_graph_t* dag_to_wordgraph ( dag_t dag,
int32 *  senscale,
lm_t lm,
dict_t dict 
)

Convert a dag to wordgraph.

Parameters:
dag a DAG structure
senscale Scaling factor of the acoustic score
lm LM
dict Dict
void print_wg ( FILE *  fp,
word_graph_t wg,
dict_t dict,
int32  fmt 
)

Print a word_graph structure

Parameters:
fp File pointer
wg Word graph
fmt Format of the word graph fmt=0: simple format fmt=1: IBM format.
void word_graph_dump ( char *  dir,
char *  uttfile,
char *  id,
char *  latfile_ext,
dag_t dag,
dict_t dict,
lm_t lm,
int32 *  senscale 
)

Dump the word graph. This is similar to s3flat_fwd_dag_dump interface.

Parameters:
dir Directory name
uttfile Utterance Filename
id Utterance ID
latfile_ext Lattice file Extension
dag DAG
dict Dictionary
lm LM
senscale Senone scale
void wordgraph_free ( word_graph_t wg  ) 

Free wordgraph.

Parameters:
wg Word graph

Generated on 7 Mar 2010 by  doxygen 1.6.1