libsent/src/hmminfo/hmm_lookup.c File Reference

Look up logical HMM entry from phone name. More...

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

Go to the source code of this file.

Functions

HTK_HMM_Datahtk_hmmdata_lookup_physical (HTK_HMM_INFO *hmminfo, char *keyname)
 Look up physical (defined in HTK HMM definition file) HMM by its name.
HMM_Logicalhtk_hmmdata_lookup_logical (HTK_HMM_INFO *hmminfo, char *keyname)
 Look up logical HMM by its name.
static void hmm_count_logical_num (HTK_HMM_INFO *hmminfo)
 Count the number of logical HMM and store it.
void hmm_add_physical_to_logical (HTK_HMM_INFO *hmminfo)
 Add all physical HMM to logical HMM.
static boolean hmm_add_pseudo_phones_sub (HTK_HMM_INFO *hmminfo, char *name)
 Add a pseudo monophone and pseudo biphone to logical HMM.
void hmm_add_pseudo_phones (HTK_HMM_INFO *hmminfo)
 Update logical HMM list by adding all the possible pseudo monophone and biphone to the list.
int hmm_logical_state_num (HMM_Logical *lg)
 Generic function to get the number of states in a logical HMM.
HTK_HMM_Transhmm_logical_trans (HMM_Logical *lg)
 Generic function to get transition matrix of a logical HMM.

Variables

static int add_count
 Number of pseudo phones added to logical HMM list.


Detailed Description

Look up logical HMM entry from phone name.

These function is for searching HMM definition from phone name like "g-u+i".

The result is pointer to the corresponding logical HMM (HMM_Logical). The logical HMM holds either pointer to an actual HMM data defined in HTK HMM definition, or pointer to a pseudo HMM set when the query name is biphone or monophone and they are not defined in either HTK HMM definition or HMMList mapping file.

Adding physical HMM defined in HTK HMM definitions and pseudo phones to the logical HMM mapping function is also done here.

Author:
Akinobu LEE
Date:
Tue Feb 15 22:34:30 2005
Revision
1.1.1.1

Definition in file hmm_lookup.c.


Function Documentation

HTK_HMM_Data* htk_hmmdata_lookup_physical ( HTK_HMM_INFO hmminfo,
char *  keyname 
)

Look up physical (defined in HTK HMM definition file) HMM by its name.

Parameters:
hmminfo [in] HMM definition data
keyname [in] key string of HMM name
Returns:
pointer to the found physical HMM, NULL if not found.

Definition at line 63 of file hmm_lookup.c.

Referenced by rdhmmlist().

HMM_Logical* htk_hmmdata_lookup_logical ( HTK_HMM_INFO hmminfo,
char *  keyname 
)

Look up logical HMM by its name.

Parameters:
hmminfo [in] HMM definition data
keyname [in] key string of HMM name
Returns:
pointer to the found logical HMM, NULL if not found.

Definition at line 83 of file hmm_lookup.c.

Referenced by get_left_context_HMM(), get_right_context_HMM(), htk_hmm_set_pause_model(), new_str2phseq(), print_hmminfo(), triphone_callback_normal(), triphone_callback_right(), voca_load_htkdict_line(), and voca_load_wordlist_line().

static void hmm_count_logical_num ( HTK_HMM_INFO hmminfo  )  [static]

Count the number of logical HMM and store it.

Parameters:
hmminfo [in] HMM definition data.

Definition at line 100 of file hmm_lookup.c.

Referenced by hmm_add_physical_to_logical(), and hmm_add_pseudo_phones().

void hmm_add_physical_to_logical ( HTK_HMM_INFO hmminfo  ) 

Add all physical HMM to logical HMM.

This function should be called only if HMMList is not specified. Julius assumes all the triphones should be explicitly mapped using HMMList file.

Parameters:
hmminfo [in] HMM definition data.

Definition at line 120 of file hmm_lookup.c.

Referenced by init_hmminfo().

static boolean hmm_add_pseudo_phones_sub ( HTK_HMM_INFO hmminfo,
char *  name 
) [static]

Add a pseudo monophone and pseudo biphone to logical HMM.

Logical HMM specified in HMMlist precedes pseudo HMM: if some monophones or biphones are already defined in HMMList, pseudo HMM will not be added.

Parameters:
hmminfo [in] HMM definition data.
name [in] name of the pseudo phone to add.

Definition at line 170 of file hmm_lookup.c.

Referenced by hmm_add_pseudo_phones().

void hmm_add_pseudo_phones ( HTK_HMM_INFO hmminfo  ) 

Update logical HMM list by adding all the possible pseudo monophone and biphone to the list.

Parameters:
hmminfo [in] HMM definition data.

Definition at line 212 of file hmm_lookup.c.

Referenced by initialize_HMM().

int hmm_logical_state_num ( HMM_Logical lg  ) 

Generic function to get the number of states in a logical HMM.

Parameters:
lg [in] logical HMM
Returns:
the number of states in the logical HMM.

Definition at line 257 of file hmm_lookup.c.

Referenced by adjust_sc_index(), do_align(), get_outtrans_list(), make_phseq(), max_out_arc(), new_make_word_hmm_with_lm(), next_word(), scan_word(), totalstatelen(), voca_set_stats(), wchmm_add_word(), wchmm_duplicate_leafnode(), wchmm_duplicate_state(), and wchmm_link_subword().

HTK_HMM_Trans* hmm_logical_trans ( HMM_Logical lg  ) 

Generic function to get transition matrix of a logical HMM.

Parameters:
lg [in] logical HMM
Returns:
pointer to the transition matrix of the logical HMM.

Definition at line 273 of file hmm_lookup.c.

Referenced by adjust_sc_index(), get_outtrans_list(), max_out_arc(), new_make_word_hmm_with_lm(), next_word(), wchmm_add_word(), wchmm_calc_wordend_arc(), wchmm_duplicate_leafnode(), and wchmm_link_subword().


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