libsent/src/hmminfo/rdhmmdef_dens.c File Reference

Read HTK HMM definition file: Gaussian density. More...

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

Go to the source code of this file.

Functions

static void update_gconst (HTK_HMM_Dens *d)
 Calculate and set the GCONST value.
static HTK_HMM_Densdens_new (HTK_HMM_INFO *hmm)
 Allocate a new data area and return it.
void dens_add (HTK_HMM_INFO *hmm, HTK_HMM_Dens *new)
 Add a new data to the global structure.
HTK_HMM_Densdens_lookup (HTK_HMM_INFO *hmm, char *keyname)
 Look up a data macro by the name.
static HTK_HMM_Densdens_read (FILE *fp, HTK_HMM_INFO *hmm)
 Read one new data and returns the pointer.
HTK_HMM_Densget_dens_data (FILE *fp, HTK_HMM_INFO *hmm)
 Return a pointer to the data located at the current point.
void def_dens_macro (char *name, FILE *fp, HTK_HMM_INFO *hmm)
 Read a new data and store it as a macro.

Variables

char * rdhmmdef_token
 Current token.


Detailed Description

Read HTK HMM definition file: Gaussian density.

Author:
Akinobu LEE
Date:
Wed Feb 16 01:43:43 2005
Revision
1.1.1.1

Definition in file rdhmmdef_dens.c.


Function Documentation

static void update_gconst ( HTK_HMM_Dens d  )  [static]

Calculate and set the GCONST value.

Parameters:
d [i/o] density data

Definition at line 39 of file rdhmmdef_dens.c.

Referenced by dens_read().

static HTK_HMM_Dens* dens_new ( HTK_HMM_INFO hmm  )  [static]

Allocate a new data area and return it.

Returns:
pointer to newly allocated data.

Definition at line 57 of file rdhmmdef_dens.c.

Referenced by dens_read().

void dens_add ( HTK_HMM_INFO hmm,
HTK_HMM_Dens 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 80 of file rdhmmdef_dens.c.

Referenced by def_dens_macro(), get_dens_data(), and rd_dens().

HTK_HMM_Dens* dens_lookup ( HTK_HMM_INFO hmm,
char *  keyname 
)

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 113 of file rdhmmdef_dens.c.

Referenced by get_dens_data(), and tmix_create_codebook_index().

static HTK_HMM_Dens* dens_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 [in] HMM definition data
Returns:
pointer to the newly read data.

Definition at line 140 of file rdhmmdef_dens.c.

Referenced by def_dens_macro(), and get_dens_data().

HTK_HMM_Dens* get_dens_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 200 of file rdhmmdef_dens.c.

Referenced by state_read().

void def_dens_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 234 of file rdhmmdef_dens.c.

Referenced by rdhmmdef().


Generated on Tue Dec 18 16:01:39 2007 for Julius by  doxygen 1.5.4