#include <sent/stddefs.h>
#include <sent/htk_param.h>
#include <sent/htk_hmm.h>
Include dependency graph for write_binhmm.c:
Go to the source code of this file.
Functions | |
static void | wrt (FILE *fp, void *buf, size_t unitbyte, int unitnum) |
static void | wrt_str (FILE *fp, char *str) |
static void | wt_header (FILE *fp) |
static void | wt_opt (FILE *fp, HTK_HMM_Options *opt) |
static void | wt_type (FILE *fp, HTK_HMM_INFO *hmm) |
static int | qsort_tr_index (HTK_HMM_Trans **t1, HTK_HMM_Trans **t2) |
static void | wt_trans (FILE *fp, HTK_HMM_INFO *hmm) |
Write all transition matrix data. | |
static unsigned int | search_trid (HTK_HMM_Trans *t) |
static int | qsort_vr_index (HTK_HMM_Var **v1, HTK_HMM_Var **v2) |
static void | wt_var (FILE *fp, HTK_HMM_INFO *hmm) |
Write all variance data. | |
static unsigned int | search_vid (HTK_HMM_Var *v) |
static int | qsort_dens_index (HTK_HMM_Dens **d1, HTK_HMM_Dens **d2) |
static void | wt_dens (FILE *fp, HTK_HMM_INFO *hmm) |
Write all mixture density data. | |
static unsigned int | search_did (HTK_HMM_Dens *d) |
static void | tmix_list_callback (void *p) |
static int | qsort_tm_index (GCODEBOOK **tm1, GCODEBOOK **tm2) |
static void | wt_tmix (FILE *fp, HTK_HMM_INFO *hmm) |
Write all codebook data. | |
static unsigned int | search_tmid (GCODEBOOK *tm) |
static int | qsort_st_index (HTK_HMM_State **s1, HTK_HMM_State **s2) |
static void | wt_state (FILE *fp, HTK_HMM_INFO *hmm) |
Write all state data. | |
static unsigned int | search_stid (HTK_HMM_State *s) |
static void | wt_data (FILE *fp, HTK_HMM_INFO *hmm) |
Write all model data. | |
boolean | write_binhmm (FILE *fp, HTK_HMM_INFO *hmm) |
Variables | |
static char * | binhmm_header = BINHMM_HEADER |
Header string. | |
static HTK_HMM_Trans ** | tr_index |
Sorted data pointers for mapping from pointer to id. | |
static unsigned int | tr_num |
Length of above. | |
static HTK_HMM_Var ** | vr_index |
Sorted data pointers for mapping from pointer to id. | |
static unsigned int | vr_num |
Length of above. | |
static HTK_HMM_Dens ** | dens_index |
Sorted data pointers for mapping from pointer to id. | |
static unsigned int | dens_num |
Length of above. | |
static GCODEBOOK ** | tm_index |
Sorted data pointers for mapping from pointer to id. | |
static unsigned int | tm_num |
Length of above. | |
static unsigned int | tm_idx |
Current index. | |
static HTK_HMM_State ** | st_index |
Sorted data pointers for mapping from pointer to id. | |
static unsigned int | st_num |
Length of above. |
Definition in file write_binhmm.c.
|
Binary write function with byte swap (assume file is BIG ENDIAN)
Definition at line 49 of file write_binhmm.c. Referenced by ngram_write_bin(), write_header(), wrt_str(), wt_data(), wt_dens(), wt_opt(), wt_state(), wt_tmix(), wt_trans(), wt_type(), and wt_var(). |
|
Write a string, teminating at NULL.
Definition at line 74 of file write_binhmm.c. Referenced by wt_data(), wt_dens(), wt_header(), wt_state(), wt_tmix(), wt_trans(), and wt_var(). |
|
Write header string as binary HMM file.
Definition at line 93 of file write_binhmm.c. Referenced by write_binhmm(). |
|
Write HMM option specifications
Definition at line 106 of file write_binhmm.c. Referenced by write_binhmm(). |
|
Write HMM type of mixture tying.
Definition at line 123 of file write_binhmm.c. Referenced by write_binhmm(). |
|
qsort callback function to sort transition pointers by their address for indexing.
Definition at line 144 of file write_binhmm.c. Referenced by wt_trans(). |
|
Write all transition matrix data. The pointers of all transition matrixes are first gathered, sorted by the address. Then the transition matrix data are written by the sorted order. The index will be used later to convert any pointer reference to a transition matrix into scholar id.
Definition at line 163 of file write_binhmm.c. Referenced by write_binhmm(). |
|
Binary search function to convert transition matrix pointer to a scholar ID.
Definition at line 197 of file write_binhmm.c. Referenced by wt_data(). |
|
qsort callback function to sort variance pointers by their address for indexing.
Definition at line 229 of file write_binhmm.c. Referenced by wt_var(). |
|
Write all variance data. The pointers of all variance vectors are first gathered, sorted by the address. Then the variance vectors are written by the sorted order. The index will be used later to convert any pointer reference to a variance vector into scholar id.
Definition at line 248 of file write_binhmm.c. Referenced by write_binhmm(). |
|
Binary search function to convert variance pointer to a scholar ID.
Definition at line 278 of file write_binhmm.c. Referenced by wt_dens(). |
|
qsort callback function to sort density pointers by their address for indexing.
Definition at line 310 of file write_binhmm.c. Referenced by wt_dens(). |
|
Write all mixture density data. The pointers of all mixture densities are first gathered, sorted by the address. Then the densities are written by the sorted order. The pointers to the lower structure (variance etc.) in the data are written in a corresponding scholar id. The pointer index of this data will be used later to convert any pointer reference to a density data into scholar id.
Definition at line 331 of file write_binhmm.c. Referenced by write_binhmm(). |
|
Binary search function to convert density pointer to a scholar ID.
Definition at line 366 of file write_binhmm.c. Referenced by wt_state(), and wt_tmix(). |
|
Traverse callback function to store pointers in tm_index.
Definition at line 395 of file write_binhmm.c. Referenced by wt_tmix(). |
|
qsort callback function to sort density pointers by their address for indexing.
Definition at line 412 of file write_binhmm.c. Referenced by wt_tmix(). |
|
Write all codebook data. The pointers of all codebook densities are first gathered, sorted by the address. Then the densities are written by the sorted order. The pointers to the lower structure (mixture etc.) in the data are written by the corresponding scholar id. The pointer index of this data will be used later to convert any pointer reference to a codebook into scholar id.
Definition at line 433 of file write_binhmm.c. Referenced by write_binhmm(). |
|
Binary search function to convert codebook pointer to a scholar ID.
Definition at line 473 of file write_binhmm.c. Referenced by wt_state(). |
|
qsort callback function to sort state pointers by their address for indexing.
Definition at line 505 of file write_binhmm.c. Referenced by wt_state(). |
|
Write all state data. The pointers of all states are first gathered, sorted by the address. Then the state informations are written by the sorted order. The pointers to the lower structure (mixture etc.) in the data are written in a corresponding scholar id. The pointer index of this data will be used later to convert any pointer reference to a state data into scholar id.
Definition at line 526 of file write_binhmm.c. Referenced by write_binhmm(). |
|
Binary search function to convert state pointer to a scholar ID.
Definition at line 594 of file write_binhmm.c. Referenced by wt_data(). |
|
Write all model data. The data of all models are written. The order is not important at this top level, since there are no reference to this data. The pointers to the lower structure (states, transitions, etc.) in the data are written by the corresponding scholar id.
Definition at line 624 of file write_binhmm.c. Referenced by write_binhmm(). |
|
Top function to write HMM definition data to a binary file.
Definition at line 665 of file write_binhmm.c. |