Classes | Macros | Functions
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
 

Macros

#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)
 

Macro Definition Documentation

◆ dag_node_mark

#define dag_node_mark (   d)    d->reachable

◆ INVALID_START_FRAME

#define INVALID_START_FRAME   -1

◆ INVALID_START_INDEX

#define INVALID_START_INDEX   -1

◆ OUTLATFMT_IBM

#define OUTLATFMT_IBM   1

◆ OUTLATFMT_SPHINX3

#define OUTLATFMT_SPHINX3   0

Function Documentation

◆ dag_to_wordgraph()

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

Convert a dag to wordgraph.

Parameters
daga DAG structure
senscaleScaling factor of the acoustic score
lmLM
dictDict

◆ print_wg()

void print_wg ( FILE *  fp,
word_graph_t wg,
dict_t dict,
int32  fmt 
)

Print a word_graph structure

Parameters
fpFile pointer
wgWord graph
fmtFormat of the word graph fmt=0: simple format fmt=1: IBM format.

◆ word_graph_dump()

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
dirDirectory name
uttfileUtterance Filename
idUtterance ID
latfile_extLattice file Extension
dagDAG
dictDictionary
lmLM
senscaleSenone scale

◆ wordgraph_free()

void wordgraph_free ( word_graph_t wg)

Free wordgraph.

Parameters
wgWord graph