libsent/src/hmminfo/rdhmmdef_var.c File Reference

Read HTK HMM definition file: variance vector of Gaussian. More...

#include <sent/stddefs.h>
#include <sent/htk_hmm.h>

Include dependency graph for rdhmmdef_var.c:

Go to the source code of this file.

Functions

static HTK_HMM_Varvar_new (HTK_HMM_INFO *hmm)
void var_add (HTK_HMM_INFO *hmm, HTK_HMM_Var *new)
static HTK_HMM_Varvar_lookup (HTK_HMM_INFO *hmm, char *keyname)
static HTK_HMM_Varvar_read (FILE *fp, HTK_HMM_INFO *hmm)
 Read one new data and returns the pointer.
HTK_HMM_Varget_var_data (FILE *fp, HTK_HMM_INFO *hmm)
 Return a pointer to the data located at the current point.
void def_var_macro (char *name, FILE *fp, HTK_HMM_INFO *hmm)

Variables

char * rdhmmdef_token
 Current token.


Detailed Description

Read HTK HMM definition file: variance vector of Gaussian.

Author:
Akinobu LEE
Date:
Wed Feb 16 04:01:38 2005
Revision
1.5

Definition in file rdhmmdef_var.c.


Function Documentation

static HTK_HMM_Var* var_new ( HTK_HMM_INFO hmm  )  [static]

Allocate a new data area and return it.

Returns:
pointer to newly allocated data.

Definition at line 37 of file rdhmmdef_var.c.

Referenced by var_read().

void var_add ( HTK_HMM_INFO hmm,
HTK_HMM_Var new 
)

Add a new data to the global structure.

Parameters:
hmm [i/o] HMM definition data to store it
new [in] new data to be added

Definition at line 58 of file rdhmmdef_var.c.

Referenced by def_var_macro(), get_var_data(), and rd_var().

static HTK_HMM_Var* var_lookup ( HTK_HMM_INFO hmm,
char *  keyname 
) [static]

Look up a data macro by the name.

Parameters:
hmm [in] HMM definition data
keyname [in] macro name to find
Returns:
pointer to the found data, or NULL if not found.

Definition at line 92 of file rdhmmdef_var.c.

Referenced by get_var_data().

static HTK_HMM_Var* var_read ( FILE *  fp,
HTK_HMM_INFO hmm 
) [static]

Read one new data and returns the pointer.

If a sub-component of this data is directly defined at here, they will be read from here and assigned to this data. If a sub-component is not defined here but a macro name referencing to the component previously defined in other place, the data will be searched by the macro name and the pointer to the found component will be assigned to this model.

Parameters:
fp [in] file pointer
hmm [i/o] HMM definition data to store it
Returns:
pointer to the newly read data.

Definition at line 119 of file rdhmmdef_var.c.

Referenced by def_var_macro(), and get_var_data().

HTK_HMM_Var* get_var_data ( FILE *  fp,
HTK_HMM_INFO hmm 
)

Return a pointer to the data located at the current point.

If the current point is a macro reference, the pointer to the already defined data will be searched and returned. Otherwise, the definition of the data will be read from the current point and pointer to the newly allocated data will be returned.

Parameters:
fp [in] file pointer
hmm [i/o] HMM definition data
Returns:
pointer to the data located at the current point.

Definition at line 162 of file rdhmmdef_var.c.

Referenced by dens_read().

void def_var_macro ( char *  name,
FILE *  fp,
HTK_HMM_INFO hmm 
)

Read a new data and store it as a macro.

Parameters:
name [in] macro name
fp [in] file pointer
hmm [i/o] HMM definition data

Definition at line 197 of file rdhmmdef_var.c.

Referenced by rdhmmdef().


Generated on Tue Dec 26 16:18:00 2006 for Julius by  doxygen 1.5.0