SPRAAK
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Functions
hmm_alloc.c File Reference

Allocation of HMM structures. More...

Functions

SprHmmStatesspr_am_states_struct_alloc (int nstates, int nmix)
 
SprHmmMvgsspr_am_mvgs_struct_alloc (int nmvgs, int ovlen)
 
SprHmmHmmspr_am_hmm_struct_alloc (int nmix, const char *hmmfname, const char *unitfname, const char *mvgfname, const char *selectfname)
 
void spr_am_state_val_init (SprHmmStates *states, int state_nr)
 
int spr_am_state_val_alloc (SprHmmStates *states, int state_nr, int *mixdim)
 
void spr_am_mvg_val_init (SprHmmMvgs *mvgs, int mvg_nr)
 
int spr_am_mvg_val_alloc (SprHmmMvgs *mvgs, int mvg_nr)
 
SprHmmMvgsspr_am_mvgs_val_alloc (int nmvgs, int ovlen)
 
void spr_am_states_aid_init (SprHmmStates *states)
 Initialisation: 'selected' array to one, 'output_prob' to zero. More...
 
int spr_am_states_aid_alloc (SprHmmStates *states)
 
void spr_am_mvgs_aid_init (SprHmmMvgs *mvgs)
 
int spr_am_mvgs_aid_alloc (SprHmmMvgs *mvgs)
 
int spr_am_hmm_aid_alloc (SprHmmHmm *hmm)
 
void spr_am_states_cts_init (SprHmmStates *states)
 Initialises counts (including sum_ct) to zero. More...
 
int spr_am_states_cts_alloc (SprHmmStates *states)
 
void spr_am_mvgs_cts_init (SprHmmMvgs *mvgs)
 Initialises counts (including glob_ct) to zero. More...
 
int spr_am_mvgs_cts_alloc (SprHmmMvgs *mvgs)
 Allocates (and initialises) mvgs counts (mu_ct, sigma_ct). More...
 
int spr_am_hmm_cts_alloc (SprHmmHmm *hmm)
 
SprHmmSegspr_am_seg_alloc (const char *spelling, int nsubsegs)
 

Detailed Description

Allocation of HMM structures.

Routines for allocation and initialisation of HMM structures. The name of the routines consists of three parts. The first part is alloc_ or init_. alloc_ routines first allocate, then initialise. init_ routines only fill in default values, allocation of memory should have been done. Return value for alloc_ routines is the structure or 0 on success, and NULL or -1 on allocation failure (already allocated memory then is freed). The second part of the name gives the structure it will work on (see hmmdef.c). Routines exist for the structure Mvg (mvg), Mvgs (mvgs), State (state), States (states) and Hmm (hmm). The third part of the name indicates the part of the structure that will be allocated or initialised. _struct routines only allocate the structure, not the substructures (Mvg for Mvgs, State for States, States and Mvgs for Hmm), nor the structures allocated by _aid routines. _val routines allocate or initialise HMM values as found in HMM files (mu, sigma, logsigprod, glob_ct for Mvg; weight, state2mvg, trans, bias, sum_ct, mixdim for State). For allocation of a _val routine a totally new structure (of which the size and/or description must be specified) is made. _aid routines allocate and initialise some vectors used in training and recognition (probability and selected arrays). _cts routines allocate or initialise the counts used in reestimation (training, _ct arrays). For both _aid and _cts routines, the allocation for the HMM values (_val routine) should have been done.

Author
Jacques Duchateau
Date
1/96
Revision History:
07/97 - JD
rewritten for extended hmm structures.