libsent/src/hmminfo/rdhmmdef.c File Reference

Read HTK HMM definition file: the main. More...

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

Go to the source code of this file.

Defines

#define MAXBUFLEN   4096
 Maximum length of a line in the input.

Functions

void rderr (char *str)
 Output error message, with current reading status, and terminate.
char * read_token (FILE *fp)
 Read next token and ste it to rdhmmdef_token.
static void conv_log_arc (HTK_HMM_INFO *hmm)
 Convert all the transition probabilities to log10 scale.
void htk_hmm_inverse_variances (HTK_HMM_INFO *hmm)
 Invert all the variance values.
boolean rdhmmdef (FILE *fp, HTK_HMM_INFO *hmm)
 Main top routine to read in HTK HMM definition file.

Variables

char * rdhmmdef_token
 Current token string (GLOBAL).
static char * buf = NULL
 Local work area for token reading.
static int line
 Input Line count.


Detailed Description

Read HTK HMM definition file: the main.

This file includes the main routine to read the HMM definition file in HTK format.

This file also contains functions and global variables for per-token reading tailored for reading HTK HMM definition file. The read_token() will read the file per token, and the read token is stored in a global variable rdhmmdef_token. The other reading function will refer to this variable to read the current token.

Author:
Akinobu LEE
Date:
Wed Feb 16 00:17:18 2005
Revision
1.1.1.1

Definition in file rdhmmdef.c.


Function Documentation

void rderr ( char *  str  ) 

Output error message, with current reading status, and terminate.

Parameters:
str [in] error string

Definition at line 61 of file rdhmmdef.c.

Referenced by codebook_add(), def_regtree_macro(), dens_add(), dens_read(), get_dens_data(), get_opttype_str(), get_state_data(), get_trans_data(), get_var_data(), htk_hmmdata_add(), htk_hmmdata_read(), rdhmmdef(), read_global_opt(), state_add(), tmix_read(), trans_add(), trans_read(), var_add(), and var_read().

char* read_token ( FILE *  fp  ) 

Read next token and ste it to rdhmmdef_token.

Parameters:
fp [in] file pointer
Returns:
the pointer to the read token, or NULL on end of file or error.

Definition at line 80 of file rdhmmdef.c.

Referenced by dens_read(), get_dens_data(), get_state_data(), get_trans_data(), get_var_data(), htk_hmmdata_read(), rdhmmdef(), read_global_opt(), regtree_read(), state_read(), tmix_read(), trans_read(), and var_read().

static void conv_log_arc ( HTK_HMM_INFO hmm  )  [static]

Convert all the transition probabilities to log10 scale.

Parameters:
hmm [i/o] HMM definition data to modify.

Definition at line 109 of file rdhmmdef.c.

Referenced by rdhmmdef().

void htk_hmm_inverse_variances ( HTK_HMM_INFO hmm  ) 

Invert all the variance values.

Parameters:
hmm [i/o] HMM definition data to modify.

Definition at line 130 of file rdhmmdef.c.

Referenced by gmm_init(), outprob_init(), rdhmmdef(), and read_binhmm().

boolean rdhmmdef ( FILE *  fp,
HTK_HMM_INFO hmm 
)

Main top routine to read in HTK HMM definition file.

A HTK HMM definition file will be read from fp. After reading, the parameter type is checked and calculate some statistics.

Parameters:
fp [in] file pointer
hmm [out] pointer to a HMM definition structure to store data.
Returns:
TRUE on success, FALSE on failure.

Definition at line 155 of file rdhmmdef.c.

Referenced by init_hmminfo().


Variable Documentation

char* rdhmmdef_token

Current token string (GLOBAL).

Current token.

Definition at line 49 of file rdhmmdef.c.

Referenced by dens_read(), get_dens_data(), get_state_data(), get_trans_data(), get_var_data(), htk_hmmdata_read(), rderr(), rdhmmdef(), read_global_opt(), read_token(), regtree_read(), state_read(), tmix_read(), trans_read(), and var_read().


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