SPRAAK
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Data Structures | Modules | Macros | Typedefs | Enumerations | Functions | Variables
API_LowLvl::lib::cwr
+ Collaboration diagram for API_LowLvl::lib::cwr:

Data Structures

struct  SprCtToProbOD
 
struct  SprCwrBeamInfoParams
 
union  SprCwrCount
 
union  SprCwrCountPtr
 
struct  SprCwrChildInfo
 
struct  SprCwrCountNode
 
struct  SprCwrAllocBlock
 
struct  SprCwrFreeBlockInfo
 
struct  SprCwrCountFile
 
struct  SprCwrCountTree
 
struct  SprCwrCESeq
 
struct  SprCwrCECost
 
struct  SprCwrErr
 
struct  SprCwrCEDistMat
 
struct  SprCwrCEChrDiff
 
union  SprFSTCArc
 Description of a set of arcs (== state) in the FST. More...
 
struct  SprFSTArcInfo
 
union  SprCwrFSTSymSet
 some arcs may contain a set of words as output symbol More...
 
struct  SprCwrFSTSizes
 
struct  SprCwrFSTC
 
struct  SprLexOD
 
union  SprCwrLexNL
 Nodes and links in the lexicon network: final version. More...
 
struct  SprCwrLexDesc
 compressed lexicon description More...
 
struct  SprCwrClassSeq
 
struct  SprCwrPerp
 
struct  SprCwrSRMDesc
 Standard Resource Management Descriptor. More...
 
struct  SprCwrARule
 
struct  SprCwrCDPhone
 description of a context dependent phone More...
 
struct  SprCwrCIPhone
 description of a context independent phone More...
 
struct  SprCwrNodeInfo
 all info that describes a node More...
 
struct  SprCwrPhoneDesc
 
struct  SprCwrNodeSeq
 
struct  SprCwrWlatNode
 a node in the word lattice More...
 
struct  SprCwrWlatArc
 an arc in the word lattice More...
 
struct  SprCwrWordHist
 
struct  SprCwrToken
 
struct  SprCwrCToken
 collective token More...
 
struct  SprCwrBeamHandler
 
struct  SprCwrSearchResult
 
struct  SprCwrSearchCToken
 
struct  SprCwrSearchWordHist
 
struct  SprCwrSearchWlat
 
struct  SprCwrSearchUpdate
 decoder settings that can be updated during the search More...
 
struct  SprCwrSearchAdaptSpkr
 adaptive pruning settings that can be made speaker specific More...
 
struct  SprCwrSearchStd
 
struct  SprCwrSearchSpace
 
struct  SprCwrLostCount
 
struct  SprCwrSLex
 sorted lexicon More...
 
struct  SprCwrWordSet
 
struct  SprCwrWordSeq
 
struct  SprHmmFGset
 
struct  SprPhonCache
 
struct  SprRJInfo
 
struct  SprTreeQuestion
 
struct  SprTreeQuestions
 
struct  SprTreeTreeNode
 

Modules

 API_LowLvl::lib::cwr::am
 
 API_LowLvl::lib::cwr::lm
 
 API_LowLvl::lib::cwr::wlat
 

Macros

#define spr_cwr_fst_def_state(state)
 
#define spr_cwr_fst_state_get_extra_info_ptr(fst_ptr, state_info_size)
 
#define spr_cwr_fst_arc_get_state(fst_ptr, state)
 
#define spr_cwr_fst_arc_state2flags(state)
 
#define spr_cwr_fst_arc_mark_visited(fst_ptr, state)
 
#define spr_cwr_fst_arc_unmark_visited(fst_ptr, state)
 
#define spr_cwr_fst_arc_get_data(res_ptr, fst_ptr, state, state_info_size)
 
#define spr_cwr_fst_arc_skip_data(fst_ptr, state, state_info_size)
 
#define SPR_TREE_QNR_NODE_NR
 
#define SPR_TREE_QNR_NDEF
 Automatic 'question' number, marking the terminator element. More...
 

Typedefs

typedef SprCwrCountNodeSprCwrCountNodePtr
 
typedef int(* _FuncPtr3_CWR_COUNT_ )(SprCwrCountTree *ctree, SprCwrCount *last_cnt, int *last_sam, va_list *args;int spr_cwr_count_tree_scan(SprCwrCountTree *count_tree, int match_len, _FuncPtr3_CWR_COUNT_ func),...)
 
typedef double(* _FuncPtr1_CWR_ERR_ )(const void *info, int ndx_ref, int ndx_cmp)
 
typedef int(* _FuncPtr1_CWR_LEX_ )(SprCwrLexNL *lex_ptr, int node_nr, SprCwrLexDesc *lex_desc, va_list *args;int spr_cwr_lex_desc_traverse(SprCwrLexDesc *lex_desc, _FuncPtr1_CWR_LEX_ func),...)
 
typedef SprCwrClassSeqSprCwrClassSeqPtr
 
typedef void *(* _FuncPtr1_CWR_OBJECT_INTERFACE_ )(void *dst, const char *name, const char *options)
 
typedef int(* _FuncPtr2_CWR_OBJECT_INTERFACE_ )(void *interface_, void *instance, unsigned int mx_sz_instance, void *resource,...)
 
typedef SprCwrWlatNodeSprCwrWlatNodePtr
 
typedef SprCwrWlatArcSprCwrWlatArcPtr
 
typedef int(* SprCwrWlatWrite )(int action, void *info,...)
 
typedef void *(* SprCwrSTHandler )(int action, struct spr_t_cwr_search_space *search_space, void *ssp_des, void *data, int iframe)
 

Enumerations

enum  {
  SPR_CWR_INSERTION, SPR_CWR_DELETION, SPR_CWR_SUBSTITUTION, SPR_CWR_CORRECT,
  SPR_CWR_DIFF_TERMINATED
}
 
enum  {
  SPR_CWR_FST_ARC_LAST, SPR_CWR_FST_ARC_OSYMB_FINAL, SPR_CWR_FST_ARC_COST, SPR_CWR_FST_ARC_OSYMB,
  SPR_CWR_FST_ARC_NTRIV_NEXT, SPR_CWR_FST_ARC_VISITED, SPR_CWR_FST_ARC_SHIFT
}
 flags for the 'flags_isymb' field More...
 
enum  { SPR_CWR_FST_SYMB_EPS, SPR_CWR_FST_SYMB_FINAL }
 special input symbols on the arcs More...
 
enum  {
  SPR_CWR_START_NODE, SPR_CWR_START_NODE_X, SPR_CWR_END_NODE, SPR_CWR_END_NODE_X,
  SPR_CWR_ROOT_NODE, SPR_CWR_ROOT_NODE_X, SPR_CWR_LINK_NODE, SPR_CWR_LINK_NODE_X,
  SPR_CWR_XXX_NODE, SPR_CWR_XXX_NODE_X, SPR_CWR_NORMAL_NODE, SPR_CWR_FREE_NODE
}
 
enum  {
  SPR_CWR_CI_PHONES, SPR_CWR_CD_PHONES, SPR_CWR_CX_PHONES, SPR_CWR_CXI_PHONES,
  SPR_CWR_CXD_PHONES, SPR_CWR_SS_PHONES, SPR_CWR_STR_PHONES
}
 
enum  {
  SPR_CWR_LI_PHONE_FINAL, SPR_CWR_LI_TRIV_NEXT, SPR_CWR_LI_LAST_LINK, SPR_CWR_LI_TRIV2LAST,
  SPR_CWR_LI_LEX_HIST, SPR_CWR_LI_NO_LEX_HIST, SPR_CWR_LI_MARK_FSIL, SPR_CWR_LI_MASK,
  SPR_CWR_LI_SHIFT
}
 
enum  {
  SPR_CWR_QLM_WORD, SPR_CWR_QLM_CONTEXT, SPR_CWR_QLM_NEXT, SPR_CWR_QLM_PREV,
  SPR_CWR_QLM_TAG, SPR_CWR_QLM_EXPLAIN, SPR_CWR_QLM_TEST_PROB, SPR_CWR_QLM_TEST_PALL
}
 
enum  {
  SPR_CWR_AR_RCW_SEQS, SPR_CWR_AR_OCW_SEQS, SPR_CWR_AR_OPT_SEQS, SPR_CWR_AR_TRIV_SET,
  SPR_CWR_AR_USED
}
 info More...
 
enum  {
  SPR_CWR_AR_INSERT, SPR_CWR_AR_INSERT_BEFORE, SPR_CWR_AR_INSERT_AFTER, SPR_CWR_AR_DELETE,
  SPR_CWR_AR_SUBSTITUTE, SPR_CWR_AR_ADD_VARIANT
}
 action More...
 
enum  { SPR_CWR_NIF_FINAL, SPR_CWR_NIF_NO_TR, SPR_CWR_NIF_MASK, SPR_CWR_NIF_SHIFT }
 
enum  { SPR_CWR_STORE_NOTHING, SPR_CWR_STORE_PHONES, SPR_CWR_STORE_NODES }
 
enum  {
  SPR_CWR_ST_FRAME_POST, SPR_CWR_ST_SKIP, SPR_CWR_ST_FRAME_PRE, SPR_CWR_ST_WAIT,
  SPR_CWR_ST_START, SPR_CWR_ST_END, SPR_CWR_ST_INSTALL, SPR_CWR_ST_UNINSTALL,
  SPR_CWR_ST_MODIF
}
 
enum  {
  SPR_CWR_SEARCH_CHANGE_START, SPR_CWR_SEARCH_CHANGE_STOP, SPR_CWR_LOAD_PHONES, SPR_CWR_UNLINK_LEX,
  SPR_CWR_LINK_LEX, SPR_CWR_UNLINK_LM, SPR_CWR_LINK_LM, SPR_CWR_LOAD_HMM,
  SPR_CWR_SEARCH_MAX, SPR_CWR_SEARCH_MIN, SPR_CWR_SEARCH_H_ADAPT, SPR_CWR_SEARCH_MODE,
  SPR_CWR_SEARCH_LMI, SPR_CWR_SEARCH_CONTRAINT, SPR_CWR_SEARCH_TRACE, SPR_CWR_WLAT_HANDLER,
  SPR_CWR_BEAM_HANDLER, SPR_CWR_MSS_NR_ACTIONS
}
 
enum  {
  SPR_CWR_PHONE_LOADED, SPR_CWR_LEX_LOADED, SPR_CWR_HMM_LOADED, SPR_CWR_LM_LOADED,
  SPR_CWR_SEARCH_READY, SPR_CWR_MODIF_CLOSED, SPR_CWR_LM_FWD_READY, SPR_CWR_LM_CACHE_READY,
  SPR_CWR_LMC_HASH_READY, SPR_CWR_SCORE_HIST_READY, SPR_CWR_CHECK_SEARCH_READY
}
 
enum  { SPR_CWR_END_ALL, SPR_CWR_END_WEND, SPR_CWR_END_SEND }
 
enum  { SPR_CWR_FWD_NONE, SPR_CWR_FWD_UNI, SPR_CWR_FWD_LTD, SPR_CWR_FWD_FULL }
 
enum  {
  SPR_CWR_SENTENCE_BEGIN, SPR_CWR_SENTENCE_END, SPR_CWR_OTHER_HTML_MARKER, SPR_CWR_UNKNOWN_WORD,
  SPR_CWR_PARTIAL_WORD, SPR_CWR_EMPTY_LM_SLOT
}
 
enum  { SPR_CWR_SLEX_FREE_NON, SPR_CWR_SLEX_FREE_MAT, SPR_CWR_SLEX_FREE_VEC }
 
enum  { SPR_HMM_FGMO_S_AV, SPR_HMM_FGMO_S_MAX, SPR_HMM_FGMO_G_MAX }
 
enum  {
  SPR_FROG_BMP, SPR_FROG_16, SPR_FROG_32, SPR_FROG_COMPACT,
  SPR_FROG_FAST_MVG, SPR_FROG_GS, SPR_FROG_NO_GS
}
 Different flags for the FRoG-system. More...
 

Functions

int spr_mvg_check (SprHmmMvgs *mvgs)
 
int spr_mvg_floor (SprHmmMvgs *mvgs, double min_lsp)
 
int spr_ct_from_path (const float *const *data, int nfr, SprHmmHmm *hmm, const SprHmmSeg *sdes, int *restrict path, int trans_err_level, double *trans_logprob_rv)
 
SprHmmSegspr_seg_to_path (int **path_rv, const float ***data_rv, int *f0_rv, int *nfr_rv, const SprCwrPhoneDesc *phones, const SprSegmentation *seg, const float *const *data_, double fshift)
 
int spr_ct_from_seg (const float *const *data, SprHmmHmm *hmm, SprSegmentation *seg, double fshift, double *logprob)
 Make incremental sums of observation and transition counts based on an unit-level segmentation. More...
 
int spr_ct_to_oprob (SprHmmHmm *hmm, float mincount, float logeps, float fac)
 
int spr_ct_to_oprob2 (SprHmmHmm *hmm, float mincount, float logeps, float fac)
 
int spr_ct_to_mvg1 (const SprHmmMvgs *mvgs, int imix, double mincount, double varmin, const char *pool_str)
 
int spr_ct_to_mvg (SprHmmHmm *hmm, double mincount, float varmin, const char *pool_str)
 
int spr_varmin_mvg1 (const SprHmmMvgs *mvgs, int imix, double varmin)
 
int spr_varmin_mvg (SprHmmHmm *hmm, float varmin)
 
int spr_renorm_oprob (SprHmmHmm *hmm, int state_nr, float logeps)
 
int spr_ct_to_tprob (SprHmmHmm *hmm, float mincount, float logeps, float fac)
 
int spr_ct_to_prob (SprHmmHmm *hmm, float mincount, float varmin, const char *pool, float logminno, float logminsp, int rel_eps, float logmintr, float smoothing)
 
SprSegmentationspr_cwr_path_to_seg (const SprCwrWordHist *const *sentence, const SprCwrNodeSeq *node_seq, const SprSspDesc *ssp_des, const SprCwrSearchSpace *search_space, int word_markers)
 
SprHmmSegspr_cwr_path_to_path (int **path, const SprCwrWordHist *const *sentence, const SprCwrNodeSeq *node_seq, const SprSspDesc *ssp_des, const SprCwrSearchSpace *search_space)
 
SprSegmentationspr_cwr_word_seg (const SprCwrWordHist *const *sentence, const SprSspDesc *ssp_des, const SprCwrSearchSpace *search_space)
 
char * spr_cwr_find_option (char *cmd_line, char *defaults, char *option)
 
char * spr_cwr_options_to_cmd_str (SprStream *dest, char *cmd_line, char *defaults)
 
SprCwrSearchSpacespr_cwr_search_space_load (const char *ci_fname, const char *cd_fname, const char *lexicon, const char *unwind, const char *hmm_fname, const char *mvg_fname, const char *sel_fname, const char *acmod_opt, const char *top_n, const char *rmg_flags, float logminout, const char *beam_info)
 
SprCwrSearchSpacespr_cwr_search_space_free_ (SprCwrSearchSpace *search_space)
 Free all information loaded by load_search_space(). More...
 
void spr_cwr_count_tree_mem_print (SprStream *fd, const SprCwrCountTree *count_tree)
 
SprCwrCountTreespr_cwr_count_tree_mem_limit (SprCwrCountTree *count_tree, int memory_limit)
 
int spr_cwr_count_file_assign (SprCwrCountFile *count_file, const char *fname, unsigned int mode)
 
SprCwrCountTreespr_cwr_count_tree_free (SprCwrCountTree *count_tree, int content_only, SprMsgId *routine)
 
SprCwrCountTreespr_cwr_count_tree_alloc (SprCwrCountTree *count_tree, int depth, const SprDT *type)
 
SprCwrCountspr_cwr_count_read (SprCwrCountFile *count_file)
 
int spr_cwr_count_write (SprCwrCountFile *count_file, const SprCwrCount *count)
 
SprCwrCountspr_cwr_count_tree_step (SprCwrCountTree *count_tree)
 
SprCwrChildInfospr_cwr_count_tree_select (SprCwrCountTree *count_tree, int *class_seq, int match_depth, int create_missing)
 Find a sub tree in the count tree. More...
 
int spr_cwr_count_tree_mem_merge (SprCwrCountTree *count_tree)
 
SprCwrChildInfospr_cwr_count_tree_next (SprCwrCountNode *count_node, int class_id)
 
SprCwrChildInfospr_cwr_count_tree_Next (SprCwrCountNodePtr *count_node_ptr, int class_id, int final_node, SprCwrCountTree *count_tree)
 
SprCwrChildInfospr_cwr_count_tree_Next_ (SprCwrChildInfo *child, int class_id, int final_node, SprCwrCountTree *count_tree)
 
int spr_cwr_count_inc (SprCwrCountTree *count_tree)
 
int spr_cwr_count_tree_print (SprStream *dest, SprCwrCountTree *count_tree)
 Print the content of the count tree. More...
 
void spr_cwr_err_free (SprCwrErr *info)
 
int spr_cwr_err_seq_expand (SprCwrCESeq *seq, int add_el)
 
SprCwrCEDistMatspr_cwr_err_dist_free_data (SprCwrCEDistMat *dmat)
 
SprCwrCEDistMatspr_cwr_err_dist_mat_read (const char *fname, const SprStrHashTbl *dic)
 
SprCwrCEChrDiffspr_cwr_err_chr_diff_free (SprCwrCEChrDiff *info)
 
SprCwrCEChrDiffspr_cwr_err_chr_diff_init (const char *options, int opt_len, const SprStrHashTbl *ndx2str)
 
double spr_cwr_err_chr_diff_func (const SprCwrCEChrDiff *info, int ndx_ref, int ndx_cmp)
 
int spr_cwr_err (SprCwrErr *info)
 
size_t spr_cwr_fstc_size (SprCwrFSTSizes *fst_sizes, unsigned int state_info_size, unsigned int state_info_align)
 
SprCwrFSTCspr_cwr_fstc_free (SprCwrFSTC *fst)
 
SprCwrFSTCspr_cwr_fstc_read (SprCwrFSTC *fst, const char *fname, const char *options, const SprCwrSLex *lex_isymb, const SprCwrSLex *lex_osymb, unsigned int state_info_size, unsigned int state_info_align)
 
int spr_cwr_fstc_write (const SprCwrFSTC *fst, const char *fname, int ASCII)
 
void spr_cwr_fstc_clear_visited (SprCwrFSTC *fst)
 
SprCwrFSTCspr_cwr_fst_static2dyn (SprCwrFSTC *fst, const char *fname)
 
SprCwrFSTCspr_cwr_fst_dyn2static (SprCwrFSTC *fst, const char *fname)
 
int spr_cwr_lex_size (const SprCwrLexDesc *lex_desc)
 
void spr_cwr_lex_word_print (SprStream *dest, const char *lm, int word_nr, const char *rm, const SprCwrLexDesc *lex_desc)
 
SprCwrLexDescspr_cwr_lex_desc_info_free (SprCwrLexDesc *lex_desc, SprMsgId *routine)
 
SprCwrLexDescspr_cwr_lex_desc_free (SprCwrLexDesc *lex_desc, SprMsgId *routine)
 Free the lexicon description. More...
 
void spr_cwr_lex_desc_print (SprStream *dest, SprCwrLexDesc *lex_desc, const SprCwrPhoneDesc *ph)
 Print the tree structured lexicon in a linear format. More...
 
SprCwrLexNLspr_cwr_lex_node_next (const SprCwrLexNL *lex_ptr)
 
void spr_cwr_lex_desc_dump (const SprCwrLexDesc *lex_desc, SprStream *fd)
 Dump all information in the compressed/state-based lexicon. More...
 
int spr_cwr_lex_desc_check (SprCwrLexDesc *lex_desc, const SprCwrPhoneDesc *ph)
 Check for errors in the lexicon network. More...
 
int spr_cwr_lex_desc_opt_check (SprCwrLexDesc *lex_desc, const SprCwrPhoneDesc *ph)
 
SprCwrLexDescspr_cwr_lex_desc_read (SprCwrLexDesc *lex_desc, const char *lex_fname, const char *clex_fname, const SprCwrPhoneDesc *phone_desc, const char *unwind)
 
SprCwrLexDescspr_cwr_lex_desc_scan (SprCwrLexDesc *lex_desc, SprCwrPhoneDesc *phone_desc, const char *unwind, const char *lex_fname)
 
int spr_cwr_lex_sent_to_trellis (SprCwrLexDesc *lex_desc, const char *sentence, int word_level)
 
int spr_cwr_lex_node_expands_to (SprCwrLexNL *lex_ptr, SprCwrLexNL *to)
 
char * spr_cwr_phone_desc (char *word_str, SprCwrLexDesc *lex_desc, SprCwrPhoneDesc *ph, int compact, int wexpand_flags)
 
int spr_cwr_lexicon_print (const char *dest, SprCwrLexDesc *lex_desc, SprCwrPhoneDesc *ph, int wexpand_flags, SprStream *progress)
 
SprCwrPerpspr_cwr_perp_close (SprCwrPerp *pp, int deallocate)
 
SprCwrPerpspr_cwr_perp_open (SprCwrPerp *pp_in, const SprCwrLMInterface *lmi, SprCwrLMInstance *lm_data, SprCwrSearchLmcHash *lmc_hash)
 
int spr_cwr_perp_init0 (SprCwrPerp *pp, int sos)
 
void spr_cwr_perp_init1 (SprCwrPerp *pp)
 
int spr_cwr_perp_add_word (SprCwrPerp *pp, int word_id)
 
int spr_cwr_perp_add_wordset (SprCwrPerp *pp, int first_wid, int last_wid)
 Expand the word sequence with one word, but the exact word ID is unknown. More...
 
int spr_cwr_perp_cadd_eos (SprCwrPerp *pp)
 
int spr_cwr_perp_get_opt_seq (SprCwrPerp *pp, float *score)
 Find the best scoring class sequence matching the given word sequence. More...
 
int spr_cwr_perp_sent (SprCwrPerp *pp, SprCwrWordSeq *word_seq, int cond_sz)
 
float spr_cwr_perp_test (const char *fname_cor, const SprCwrLMInterface *lmi, SprCwrLMInstance *lm_data, const SprCwrSLex *lex, const char *lmc_start, const char *lmc_end, SprStream *report)
 
int spr_cwr_lm_query (SprStream *fd, int what, const SprCwrLMInterface *lmi, SprCwrLMInstance *lm_data, const SprCwrSLex *lex, const char *context_str, const char *word_str)
 Query the language model. More...
 
SprCwrARulespr_cwr_assimil_rules_free (SprCwrARule *rules)
 
void spr_cwr_assimil_rules_print (SprStream *fd, const char *lm, const SprCwrARule *rules, SprCwrPhoneDesc *ph)
 
void spr_cwr_assimil_rule_print (SprStream *fd, const SprCwrARule *rule, const SprCwrPhoneDesc *ph)
 
SprCwrPhoneDescspr_cwr_phone_desc_read (SprCwrPhoneDesc *phone_desc, int set_node_info, const char *ci_fname, const char *cd_fname)
 
const SprCwrCDPhonespr_cwr_phone_str2cd (const SprCwrPhoneDesc *phones, const char *phone_str, int phone_str_len)
 
const SprCwrNodeInfospr_cwr_phone_str2cds (const SprCwrPhoneDesc *phones, const char *phone_str, int phone_str_len, int state_ndx)
 
int spr_cwr_phone_desc_purge (SprCwrPhoneDesc *phone_desc, int **ci_xlat_rv)
 
int spr_cwr_phone_desc_write (SprStream *dest, SprCwrPhoneDesc *ph, int used_only, int ignore_node_info)
 
void spr_cwr_node_seq_print (SprStream *dest, const char *lm, const SprCwrNodeSeq *node_seq, const char *rm, const SprCwrSearchSpace *search_space)
 Print the given node sequence in textual format. More...
 
void spr_cwr_sent_print (SprStream *dest, const SprCwrWordHist *word_hist, const SprCwrSearchSpace *search_space)
 
int spr_cwr_tokens_check (const SprCwrSearchSpace *search_space, SprCwrHashP2X *ctoken_htbl, SprCwrHashP2X *whist_htbl)
 Check the token lists for errors and inconsistencies. More...
 
int spr_cwr_search_space_check (const SprCwrSearchSpace *search_space)
 Check the search space for errors and inconsistencies. More...
 
int spr_cwr_search_info_reset (SprCwrSearchSpace *search_space, int spkr_id)
 
void spr_cwr_gauss_limit (SprCwrSearchSpace *search_space)
 
void spr_cwr_search_info_compact (SprCwrSearchSpace *search_space)
 
void spr_cwr_search_space_parts_print (SprStream *dest, const char *lm, int parts_mask, const char *rm)
 
int spr_cwr_search_space_modify (SprCwrSearchSpace *search_space, unsigned int action,...)
 
SprCwrSearchSpacespr_cwr_search_space_free (SprCwrSearchSpace *search_space, SprMsgId *routine)
 
SprCwrSearchSpacespr_cwr_search_space_new (void)
 
SprCwrTokenspr_iwr_best_word (int top_n, SprCwrSearchSpace *search_space)
 
SprCwrTokenspr_cwr_best_sent (SprCwrSearchSpace *search_space)
 
SprCwrTokenspr_cwr_find_best_token (SprCwrCToken **Best_ctoken, SprCwrSearchSpace *search_space)
 
int spr_cwr_data_process (SprStream *dfptr, int nfr, SprSspDesc *ssp_des, SprCwrSearchSpace *search_space)
 
SprCwrSLexspr_cwr_slex_free (SprCwrSLex *lex, SprMsgId *routine)
 Free a set of lexicon names. More...
 
SprCwrSLexspr_cwr_slex_alloc (SprCwrSLex *lex, int nr_words, int wlen_tot)
 Allocate and/or initialise the set of lexicon names. More...
 
int spr_cwr_sum_str_len (const SprCwrSLex *lex)
 
SprCwrSLexspr_cwr_slex_dup (SprCwrSLex *lex_dst, const SprCwrSLex *lex_src)
 
SprCwrSLexspr_cwr_slex1_create (SprCwrSLex *lex, int duplicate, const SprStrHashTbl *whash_main, const SprStrHashTbl *whash_ext)
 
SprCwrSLexspr_cwr_slex_read (SprCwrSLex *lex, const char *fname, SprKeySet *keys, int split_phon_desc, int unsorted)
 
int spr_cwr_slex_dump (SprStream *fd, const SprCwrSLex *lex)
 
const char * spr_cwr_slex_get_word (int word_id, const SprCwrSLex *lex)
 Convert the word id to the corresponding word string. More...
 
int spr_cwr_is_html_marker (const char *word, int len)
 
int spr_cwr_get_word_id (SprCwrWordSet *word_set, const char *word, int len, const SprCwrSLex *lex, int notify_level)
 
void spr_cwr_word_set_print (SprStream *dest, const SprCwrWordSet *word, const SprCwrSLex *lex)
 Print all words in a word_set. More...
 
int spr_cwr_word_seq_decode (SprCwrWordSeq *word_seq, const char *word_str, const SprCwrSLex *lex, int notify_level)
 
SprAcmod * spr_am_dft_read (const char *hmm_fname, const char *mvg_fname, const char *sel_fname)
 Read the HMM transition probs and state priors. More...
 
void spr_fmvg_dump (SprStream *fd, const SprHmmFGset *gset)
 
int spr_check_keys (const char **key_desc, SprKeySet *keys, SprMsgId *routine, const char *fname)
 
float * spr_fmvg_mg_prob (const float *x, SprAcmod *restrict gset, float *restrict pvec)
 
float * spr_fmvg_output_prob (const float *x, SprAcmod *restrict gset, float *restrict oprob)
 
float * spr_fmvg_output_prob_mo (const float *x, SprHmmFGset *restrict gset, float *restrict oprob)
 
float * spr_fmvg_log_oprob (SprAcmod *restrict gset)
 
SprAcmod * spr_fmvg_read (const char *hmm_fname, const char *mvg_fname, const char *sel_fname)
 
int SPRaak_debug (const char *fname)
 
int SPRaak_tmpdir (const char *tmpdir)
 
void spr_conv_weight_log2lin (SprHmmStates *states)
 
void spr_conv_trans_log2lin (SprHmmStates *states)
 
void spr_conv_weight_lin2log (SprHmmStates *states)
 
void spr_conv_trans_lin2log (SprHmmStates *states)
 
SprAcmod * spr_am_mdt_read (const char *hmm_fname, const char *mvg_fname, const char *sel_fname)
 
void spr_mvg_mg_prob (const float *data, const SprHmmMvgs *mvgs, int start, int stop)
 
void spr_mvg_mg_floor (SprHmmMvgs *mvgs, int nsel, double logminout)
 
void spr_mvg_mg_sort (double *pvec, int start, int stop, int top_n, int *index, double *ptop)
 
void spr_am_output_prob (char *dptr, SprHmmHmm *hmm)
 
SprSegmentationspr_path_path2seg (int nfr, int *path, SprHmmSeg *udes, SprHmmSegs *units, int subunits, SprSspDesc *ssp_des)
 
SprSegmentationspr_path_seg_step_down (SprSegmentation *seg_in, const SprHmmSegs *units, const SprHmmSegs *vocab)
 
int spr_phon_lib_len (const char *const *phonlib)
 
char ** spr_phon_lib_free (char **phonlib, SprMsgId *routine)
 Release the memory occupied by the phoneme library. More...
 
void spr_phon_lib_print (SprStream *dest, const char *const *phonlib)
 Print the phone library. More...
 
char ** spr_phon_lib_read (const char *fn_phonlib, SprKeySet **keys)
 
char ** spr_phon_lib_split (char **phonlibL, int *missing)
 
SprPhonCache ** spr_phon_cache_free (SprPhonCache **phoncache, SprMsgId *routine)
 Deallocates the memory used by the phoneme quick acces table. More...
 
SprPhonCache ** spr_phon_cache_make (const char *const *phonlib)
 Make a quick acces table, based on the first letter. More...
 
int spr_phon_get_nr (const char *str, const SprPhonCache *const *phoncache)
 
char * spr_phon_scan_nr (SprPhonNum *phon_id, const char *str, const SprPhonCache *const *phoncache)
 
int spr_phon_str_to_nr (SprPhonNum **phon_nrs, int *allocated_len, int start_pos, const SprPhonCache *const *phoncache, const char *phon_str, const char *phon_delim, const char *ignore, const char *incl_ignore)
 
int spr_phon_find_nr (const SprPhonNum *phon_nrs, int len, SprPhonNum elem)
 Find a given phone is an array of phone numbers. More...
 
void spr_pipe_sync_send (SprStream *sync_out, int *sync_counter)
 
int spr_pipe_correct_sync_nr (int sync_nr, int *sync_counter)
 
int spr_pipe_synchronize_ (SprStream *sync_out, SprStream *sync_in, int *sync_counter, SprStream *dest_file, char *intro_text, char *warn)
 
int spr_pipe_synchronize (SprStream *sync_out, SprStream *sync_in, int *sync_counter)
 
SprRJInfospr_rj_free (SprRJInfo *info)
 
int spr_rj_set_model_link (SprHmmSegs *vocab, SprHmmSegs *units, int model_nr, SprRJInfo *info)
 
SprRJInfospr_rj_init (SprHmmSegs *vocab, SprHmmSegs *units, char *reject_fname)
 
void spr_rj_set_score (SprRJInfo *info, float *scores, int nfr)
 
void spr_frog_sel_bmp_compress (SprHmmUchar4 *restrict sel, int nmvgs)
 
void spr_frog_sel_bmp_uncompress (SprHmmUchar4 *restrict sel, int nmvgs)
 
SprHmmRmgInfospr_frog_rmg_free (SprHmmRmgInfo *info)
 Deallocates all memory allocated to the rmg_info. More...
 
int spr_frog_rmg_sel_sum (const SprHmmRmgInfo *info, const SprHmmUchar4 *sel)
 Count the number of ones in the selection array. More...
 
SprHmmRmgInfospr_frog_rmg_change (SprHmmRmgInfo *info, double margin, double sigma)
 
SprHmmUcharspr_frog_rmg_select_ (const SprHmmRmgInfo *info, const float *x, const SprHmmUchar *sel_in, SprHmmUchar *restrict sel_out)
 
void spr_frog_rmg_multi_select (SprHmmMvgs *const *mvgs, int nmix, const float *dptr)
 
int spr_frog_rmg_stats_alloc (SprHmmRmgInfo *info)
 
int spr_frog_rmg_stats_read (SprHmmRmgInfo *info, char *fname)
 
int spr_frog_rmg_stats_write (char *fname, SprHmmRmgInfo *info)
 Dump the rmg stats to disk. More...
 
SprHmmUchar4spr_frog_rmg_stats_select (SprHmmRmgInfo *info, float *x, SprHmmUchar4 *sel_out)
 
int spr_frog_rmg_stats_cnt (const SprHmmRmgInfo *info, int trunc_val, float *max_red_loss, float *est_red_loss)
 
SprHmmRmgInfospr_frog_rmg_stats_reduce (SprHmmRmgInfo *info, int trunc_val)
 
int spr_frog_rmg_write (const char *rmg_fname, SprAcmod *gset, SprHmmMvgs **mvgs, int nmix)
 
SprHmmRmgInfospr_frog_rmg_bmp_compress (SprHmmRmgInfo *info, int effort)
 
SprHmmRmgInfospr_frog_rmg_init (SprAcmod *gset, SprHmmMvgs *mvgs, int imix, const char *rmg_flags)
 Initialise the rmg_info. More...
 
void spr_frog_rmgs_init (SprHmmMvgs **mvgs, int nmix, const char *rmg_flags)
 
void spr_frog_rmg_reduc (SprHmmRmgInfo *info, const SprHmmUchar *sel)
 
void spr_tree_questions_print (SprStream *fptr, SprTreeQuestions *questions, SprCwrPhoneDesc *phones)
 
SprTreeQuestionsspr_tree_questions_free (SprTreeQuestions *questions)
 
SprTreeQuestionsspr_tree_questions_alloc (int nquestions)
 
void spr_tree_questions_purge (SprTreeQuestions *questions, const int *ci_xlat, SprCwrPhoneDesc *phones)
 
SprTreeQuestionsspr_tree_questions_read (const char *q_file, SprCwrPhoneDesc *phones)
 
int spr_tree_state_counts_read (const char *count_file, SprHmmStates *states)
 
char * spr_tree_context_nr2string (int context_nr)
 
int spr_tree_context_string2nr (char *context_str)
 
SprTreeTreeNodespr_tree_print (SprStream *fptr, SprTreeTreeNode *treenode, SprTreeQuestions *questions, int level)
 
SprTreeTreeNodespr_tree_free (SprTreeTreeNode *treenode)
 free_tree() frees a tree structure and returns NULL. More...
 
int spr_tree_is_yes (int phon_nr, SprTreeQuestion *question)
 
int spr_tree_node_is_yes (int node_nr, int first_node, int last_node)
 
void *** spr_tree_cube_alloc (int mats, int rows, int cols, int el_size)
 
void spr_tree_cube_free (void *cube, int mats, int rows)
 free_cube() frees a cube with mats matrices and rows rows. More...
 
SprTreeTreeNodespr_tree_read (SprStream *tfptr, SprTreeQuestions *questions, int *statenr, char **tstr, int *tstrlen, int itree, SprCmdBuf *cmdbuf)
 
SprTreeTreeNodespr_tree_read_multi (char *tree_ifname, SprCwrPhoneDesc *phones, SprTreeQuestions *questions, int *statenr)
 
void spr_tree_prune (SprTreeTreeNode *treenode, float max_overlap, int *statenr)
 

Variables

const SprOptDesc spr_ct_to_prob_od []
 
const SprCmdOptDesc spr_cwr_od_beam_info []
 
const SprCwrCountTree spr_cwr_empty_count_tree
 
const SprCwrErr spr_cwr_empty_cwr_err
 
const char *const spr_cwr_err_str []
 
double(* spr_cwr_err_nist_werr )(const void *info, int ndx_ref, int ndx_cmp)
 
double(* spr_cwr_err_dist_mat )(const void *info, int ndx_ref, int ndx_cmp)
 Alignment cost function based on (phonetic) features. More...
 
const SprCmdOptDesc spr_cwr_od_err_chr_diff []
 
const SprCwrFSTC spr_cwr_empty_fst_c
 
const char *const spr_cwr_special_node_str [SPR_CWR_NR_SPECIAL_NODES+1]
 
const char *const spr_cwr_special_node_str_short [SPR_CWR_NR_SPECIAL_NODES]
 
const char *const spr_cwr_phone_type_str []
 
const SprOptDesc spr_lex_load_opt_od []
 
const SprOptDesc spr_lex_load_req_od []
 
const SprCmdOptDesc spr_cwr_od_lex_unwind []
 
SprCwrLexDesc const spr_cwr_empty_lex_desc
 
const SprCmdOptDesc spr_cwr_od_lm_query []
 
const SprCwrPhoneDesc spr_cwr_empty_phone_desc
 
const char *const spr_cwr_str_store_nodes []
 
const SprCwrSearchCToken spr_cwr_empty_search_ctoken
 
const SprCwrSearchWordHist spr_cwr_empty_search_word_hist
 
const SprCmdOptDesc spr_cwr_od_wlat_opts []
 
const SprCwrSearchWlat spr_cwr_empty_search_wlat
 
const char *const spr_cwr_load_flags_str []
 
const char *const spr_cwr_special_word_str [SPR_CWR_NR_SPECIAL_LM_CLASSES+1]
 see also get_word_id() More...
 
const SprCwrSLex spr_cwr_empty_slex
 
const SprCwrWordSeq spr_cwr_empty_word_seq
 
const SprCwrSRMDesc spr_cwr_srm_desc_am_dft
 
const char *const spr_hmm_str_fgmo []
 
const SprHmmFGset spr_hmm_empty_fgset
 
const char * spr_check_hmm_keys []
 required keys in an HMM-file and their correct values More...
 
const char * spr_check_mvg_keys []
 required keys in an MVG-file and their correct values More...
 
const char * spr_check_sel_keys []
 required keys in an SEL-file and their correct values More...
 
const SprCmdOptDesc spr_cwr_od_am_std []
 
const SprCwrSRMDesc spr_cwr_srm_desc_am_std
 
const char *const str_mdf_method []
 
const char *const str_mdt_mask []
 
const SprCmdOptDesc spr_cwr_od_am_mdt []
 
const SprCwrSRMDesc spr_cwr_srm_desc_am_mdt
 
const SprTreeTreeNode spr_tree_empty_treenode
 

Detailed Description

Macro Definition Documentation

#define spr_cwr_fst_def_state (   state)
#define spr_cwr_fst_state_get_extra_info_ptr (   fst_ptr,
  state_info_size 
)
#define spr_cwr_fst_arc_get_state (   fst_ptr,
  state 
)
#define spr_cwr_fst_arc_state2flags (   state)
#define spr_cwr_fst_arc_mark_visited (   fst_ptr,
  state 
)
#define spr_cwr_fst_arc_unmark_visited (   fst_ptr,
  state 
)
#define spr_cwr_fst_arc_get_data (   res_ptr,
  fst_ptr,
  state,
  state_info_size 
)
#define spr_cwr_fst_arc_skip_data (   fst_ptr,
  state,
  state_info_size 
)
#define SPR_TREE_QNR_NODE_NR

Automatic question number for questions concerning the node number.

#define SPR_TREE_QNR_NDEF

Automatic 'question' number, marking the terminator element.

Typedef Documentation

typedef int(* _FuncPtr3_CWR_COUNT_)(SprCwrCountTree *ctree, SprCwrCount *last_cnt, int *last_sam, va_list *args;int spr_cwr_count_tree_scan(SprCwrCountTree *count_tree, int match_len, _FuncPtr3_CWR_COUNT_ func),...)
typedef double(* _FuncPtr1_CWR_ERR_)(const void *info, int ndx_ref, int ndx_cmp)
typedef int(* _FuncPtr1_CWR_LEX_)(SprCwrLexNL *lex_ptr, int node_nr, SprCwrLexDesc *lex_desc, va_list *args;int spr_cwr_lex_desc_traverse(SprCwrLexDesc *lex_desc, _FuncPtr1_CWR_LEX_ func),...)
typedef void*(* _FuncPtr1_CWR_OBJECT_INTERFACE_)(void *dst, const char *name, const char *options)
typedef int(* _FuncPtr2_CWR_OBJECT_INTERFACE_)(void *interface_, void *instance, unsigned int mx_sz_instance, void *resource,...)
typedef int(* SprCwrWlatWrite)(int action, void *info,...)
typedef void*(* SprCwrSTHandler)(int action, struct spr_t_cwr_search_space *search_space, void *ssp_des, void *data, int iframe)

Enumeration Type Documentation

anonymous enum
Enumerator
SPR_CWR_INSERTION 
SPR_CWR_DELETION 
SPR_CWR_SUBSTITUTION 
SPR_CWR_CORRECT 
SPR_CWR_DIFF_TERMINATED 
anonymous enum

flags for the 'flags_isymb' field

Enumerator
SPR_CWR_FST_ARC_LAST 

this is the last arc (always set when FST_ARC_NTRIV_NEXT is false)

SPR_CWR_FST_ARC_OSYMB_FINAL 

the output symbol is the real/final thing, not some 'advanced' id. for partial look-ahead

SPR_CWR_FST_ARC_COST 

the arc contains a cost (default cost==0.0)

SPR_CWR_FST_ARC_OSYMB 

the arc contains an output symbol (default output symbol == FST_SYMB_EPS)

SPR_CWR_FST_ARC_NTRIV_NEXT 

the destination state doest NOT follow directly after this arc, i.e. a 'offs' field is needed

SPR_CWR_FST_ARC_VISITED 

stated has been visited

temporary flag for use in recursive routines

SPR_CWR_FST_ARC_SHIFT 

get the input symbol (remove the flags)

anonymous enum

special input symbols on the arcs

Enumerator
SPR_CWR_FST_SYMB_EPS 

eps-arc (no input symbol)

SPR_CWR_FST_SYMB_FINAL 

final state

we use arcs to allow a cost, the symbol is a dummy

anonymous enum
Enumerator
SPR_CWR_START_NODE 
SPR_CWR_START_NODE_X 
SPR_CWR_END_NODE 
SPR_CWR_END_NODE_X 
SPR_CWR_ROOT_NODE 
SPR_CWR_ROOT_NODE_X 
SPR_CWR_LINK_NODE 
SPR_CWR_LINK_NODE_X 
SPR_CWR_XXX_NODE 
SPR_CWR_XXX_NODE_X 
SPR_CWR_NORMAL_NODE 
SPR_CWR_FREE_NODE 
anonymous enum
Enumerator
SPR_CWR_CI_PHONES 
SPR_CWR_CD_PHONES 
SPR_CWR_CX_PHONES 
SPR_CWR_CXI_PHONES 
SPR_CWR_CXD_PHONES 
SPR_CWR_SS_PHONES 
SPR_CWR_STR_PHONES 
anonymous enum
Enumerator
SPR_CWR_LI_PHONE_FINAL 
SPR_CWR_LI_TRIV_NEXT 
SPR_CWR_LI_LAST_LINK 
SPR_CWR_LI_TRIV2LAST 
SPR_CWR_LI_LEX_HIST 
SPR_CWR_LI_NO_LEX_HIST 
SPR_CWR_LI_MARK_FSIL 
SPR_CWR_LI_MASK 
SPR_CWR_LI_SHIFT 
anonymous enum
Enumerator
SPR_CWR_QLM_WORD 
SPR_CWR_QLM_CONTEXT 
SPR_CWR_QLM_NEXT 
SPR_CWR_QLM_PREV 
SPR_CWR_QLM_TAG 
SPR_CWR_QLM_EXPLAIN 
SPR_CWR_QLM_TEST_PROB 
SPR_CWR_QLM_TEST_PALL 
anonymous enum

info

Enumerator
SPR_CWR_AR_RCW_SEQS 
SPR_CWR_AR_OCW_SEQS 
SPR_CWR_AR_OPT_SEQS 
SPR_CWR_AR_TRIV_SET 
SPR_CWR_AR_USED 
anonymous enum

action

Enumerator
SPR_CWR_AR_INSERT 
SPR_CWR_AR_INSERT_BEFORE 
SPR_CWR_AR_INSERT_AFTER 
SPR_CWR_AR_DELETE 
SPR_CWR_AR_SUBSTITUTE 
SPR_CWR_AR_ADD_VARIANT 
anonymous enum
Enumerator
SPR_CWR_NIF_FINAL 

node is final in a phoneme (check the lexicon network for extension paths)

SPR_CWR_NIF_NO_TR 

do NOT check transitions out of the phoneme (only checked if the NIF_FINAL flag is set)

SPR_CWR_NIF_MASK 
SPR_CWR_NIF_SHIFT 
anonymous enum
Enumerator
SPR_CWR_STORE_NOTHING 
SPR_CWR_STORE_PHONES 
SPR_CWR_STORE_NODES 
anonymous enum
Enumerator
SPR_CWR_ST_FRAME_POST 

after token propagation

SPR_CWR_ST_SKIP 

frame skipped (indicated by the pre-processing)

SPR_CWR_ST_FRAME_PRE 

before token propagation

SPR_CWR_ST_WAIT 

waiting for a sentence start (indicated by the pre-processing)

SPR_CWR_ST_START 

start of the decoding (after waiting

see SPR_CWR_ST_WAIT)

SPR_CWR_ST_END 

end of the decoding (no more frames of pre-processing indicated a sentence break)

SPR_CWR_ST_INSTALL 

called when installing the handler (initialization)

SPR_CWR_ST_UNINSTALL 

called when removing the handler (clean-up)

SPR_CWR_ST_MODIF 

modify the behaviour of the handler

anonymous enum
Enumerator
SPR_CWR_SEARCH_CHANGE_START 
SPR_CWR_SEARCH_CHANGE_STOP 
SPR_CWR_LOAD_PHONES 
SPR_CWR_UNLINK_LEX 
SPR_CWR_LINK_LEX 
SPR_CWR_UNLINK_LM 
SPR_CWR_LINK_LM 
SPR_CWR_LOAD_HMM 
SPR_CWR_SEARCH_MAX 
SPR_CWR_SEARCH_MIN 
SPR_CWR_SEARCH_H_ADAPT 
SPR_CWR_SEARCH_MODE 
SPR_CWR_SEARCH_LMI 
SPR_CWR_SEARCH_CONTRAINT 
SPR_CWR_SEARCH_TRACE 
SPR_CWR_WLAT_HANDLER 
SPR_CWR_BEAM_HANDLER 
SPR_CWR_MSS_NR_ACTIONS 
anonymous enum
Enumerator
SPR_CWR_PHONE_LOADED 
SPR_CWR_LEX_LOADED 
SPR_CWR_HMM_LOADED 
SPR_CWR_LM_LOADED 
SPR_CWR_SEARCH_READY 
SPR_CWR_MODIF_CLOSED 
SPR_CWR_LM_FWD_READY 
SPR_CWR_LM_CACHE_READY 
SPR_CWR_LMC_HASH_READY 
SPR_CWR_SCORE_HIST_READY 
SPR_CWR_CHECK_SEARCH_READY 
anonymous enum
Enumerator
SPR_CWR_END_ALL 
SPR_CWR_END_WEND 
SPR_CWR_END_SEND 
anonymous enum
Enumerator
SPR_CWR_FWD_NONE 
SPR_CWR_FWD_UNI 
SPR_CWR_FWD_LTD 
SPR_CWR_FWD_FULL 
anonymous enum

Use of special markers: ID | KD | DH -—+----------------—+----------------— -1 | SENTENCE_BEGIN | / -2 | SENTENCE_END | / -3 | OTHER_HTML_MARKER | / -4 | / | / -5 | / | SENTENCE_BEGIN -6 | / | SENTENCE_END -7 | UNKNOWN_WORD | / -8 | PARTIAL_WORD | / -9 | EMPTY_LM_SLOT | / -10 | / | UNKNOWN_WORD

Enumerator
SPR_CWR_SENTENCE_BEGIN 
SPR_CWR_SENTENCE_END 
SPR_CWR_OTHER_HTML_MARKER 
SPR_CWR_UNKNOWN_WORD 
SPR_CWR_PARTIAL_WORD 
SPR_CWR_EMPTY_LM_SLOT 

double used: see also the note next to the definition of CLASS_LIST_END

anonymous enum
Enumerator
SPR_CWR_SLEX_FREE_NON 
SPR_CWR_SLEX_FREE_MAT 
SPR_CWR_SLEX_FREE_VEC 
anonymous enum
Enumerator
SPR_HMM_FGMO_S_AV 
SPR_HMM_FGMO_S_MAX 
SPR_HMM_FGMO_G_MAX 
anonymous enum

Different flags for the FRoG-system.

Enumerator
SPR_FROG_BMP 

use a bitmap representations (faster, allows upto 512k gaussians)

SPR_FROG_16 

use 16 bits indices, allows upto 64k gaussians

SPR_FROG_32 

use 32 bits indices

SPR_FROG_COMPACT 

use a more compact (but slower) data storage that can handle 32k/2G gaussians in 16/32 bits mode

SPR_FROG_FAST_MVG 

the gaussians (field gaussians) are stored in the fast mvg format

SPR_FROG_GS 

flag to indicate that not all gaussians are active

see spr_frog_rmg_reduc()

SPR_FROG_NO_GS 

flag to indicate that all gaussians should be made active when calling spr_frog_rmg_reduc(), irrespective of the set of active states

Function Documentation

int spr_mvg_check ( SprHmmMvgs mvgs)

Check the gaussians in a pool.
The following checks are performed:

  1. Check size limitations (same vector size for all gaussians).
  2. Check for Nan's and negative sigmas.
  3. Check for very small sigmas (less then EPS_ABS)

All small sigmas are set to a minimal value (EPS_ABS)

Returns
(1)
if sigmas are modified.
(0)
if no modifications or errors (or if NULL structure given)
(-1)
if an error occurred, if NaNs occurred or if some sigmas were negative
int spr_mvg_floor ( SprHmmMvgs mvgs,
double  min_lsp 
)

Floor the sigma's in the mvg's to assure that log(prod(sigma)) >= min_lsp for all Gaussians (natural log).

Returns
(-1) on error, the number of modified sigmas otherwise.
int spr_ct_from_path ( const float *const *  data,
int  nfr,
SprHmmHmm hmm,
const SprHmmSeg sdes,
int *restrict  path,
int  trans_err_level,
double *  trans_logprob_rv 
)

Make incremental sums of observation and transition counts.

Make incremental sums of observation and transition counts based on the given path (state-level).

  • The entries in path must refer to the local state numbering and are converted to a global state numbering.
  • The entry path[nfr] must be filled in also (jumping out of the last state).
    Returns
    -1 on error.
SprHmmSeg* spr_seg_to_path ( int **  path_rv,
const float ***  data_rv,
int *  f0_rv,
int *  nfr_rv,
const SprCwrPhoneDesc phones,
const SprSegmentation seg,
const float *const *  data_,
double  fshift 
)

Convert a given segmentation seg to the structures needed for updating the statistics, i.e. a path *path_rv, and an HMM-segmentation (return value). On success, *nfr_rv will contain the total numbers of frames spanned by the segmentation (not including any gaps) and *f0_rv will contain a shift value needed when accessing the *data_ array. If the segmentation contains gaps, a new reordered copy of the data_ array will be created and returned in *data_rv (and *f0_rv will equal 0). If data_rv equals NULL, an error is issued.

Returns
the HMM-segmentation or NULL on failure
Note
If the segmentation does not start at frame 0, but does not contain gaps otherwise, no shifted copy of data_ is made; instead *f0_rv will be set. It is up to the caller to assure that the data is accessed correctly.
int spr_ct_from_seg ( const float *const *  data,
SprHmmHmm hmm,
SprSegmentation seg,
double  fshift,
double *  logprob 
)

Make incremental sums of observation and transition counts based on an unit-level segmentation.

Alignments over units with multiple states are subdivided as uniformly as possible. Everything is based on a left-to-right assumption, so counts on NULL arcs and SKIP transitions will remain unchanged. The logprob of the frames is stored in logprob. This routine uses only the discrete time indication in the segmentation.

Returns
-1 on failure (invalid segment number/allocation failed).
int spr_ct_to_oprob ( SprHmmHmm hmm,
float  mincount,
float  logeps,
float  fac 
)

Estimate observation probabilities from counts and smooth with old probabilities.
mincount is the minimal number of frames on which the state counts must be based before a reestimation is done. If the number of frames is less than this limit, the observation transition probabilities are kept.
logeps is the minimal probability an observation can get, and is specified in the log10-domain.
fac is the weight given to the new probabilities and must be a number between 0.0 and 1.0.

Returns
0 on success and (-1) on failure.
int spr_ct_to_oprob2 ( SprHmmHmm hmm,
float  mincount,
float  logeps,
float  fac 
)

Identical to spr_ct_to_oprob(0, except that instead of flooring the probs with a constant epsilon, the epsilon is made dependent on the relative count for the label in all data.
Written out a an equation this gives:

epsilon(ilabel) = given_epsilon * count_for_ilabel_in_all_data / total_count_for_all_labels.

The reasoning about this is that if a label is split up in 2, the prob. for such new label in a state will be two times smaller than that for the old label, while the floor value (say for 'no observation') remains the same. Result of this is that with e.g. 100 labels, equally distributed, a given logeps of -4 will give a floor value of about -6.

Note
the same reasoning is applied for SC_HMM, but it is not applicable to CD_HMM: epsilon is then the same as given, for all labels.
On 4/7/97 by JD: Is this updated for reduced SC_HMMs? Why it does not use the state2mvg arrays then?
Returns
0 on success, -1 on failure.
int spr_ct_to_mvg1 ( const SprHmmMvgs mvgs,
int  imix,
double  mincount,
double  varmin,
const char *  pool_str 
)

Estimate mean and sigma of gaussian distributions for 1st and 2nd order statistics for the gaussians in mvgs.
The number of the mixture of mvgs is given by imix (for debug info only).
Depending on the string pool_str, the variances are pooled:

"P" (Pooled)
mvgs[imix]->ovlen dimensional sigma vector is the same for all gaussians in the mixture,
"FP" (Fully Pooled)
for each mixture, only one sigma remains, it is the same for all dimensions AND gaussians in the mixture,
"no"
no pooling on the sigma's is done

The mincount argument gives the minimal number of frames on which the counts must be based before a reestimation is done. If the number of frames is less than this limit, the old means and variances are kept. The varmin argument specifies a lower bound on the computed sigmas (sqrt(variances)) relative w.r.t. to the weighted average variance.

Returns
0 on success, -1 on failure.
int spr_ct_to_mvg ( SprHmmHmm hmm,
double  mincount,
float  varmin,
const char *  pool_str 
)

Execute ct_to_mvg1() for all mvgs in the hmm.

Returns
0 on success, -1 on failure.
int spr_varmin_mvg1 ( const SprHmmMvgs mvgs,
int  imix,
double  varmin 
)

Avoid overly small variances (sigma) in the Gaussians. The varmin argument specifies a lower bound on the computed sigmas (sqrt(variances)) relative w.r.t. to the weighted average variance.

Returns
0 on success, -1 on failure.
int spr_varmin_mvg ( SprHmmHmm hmm,
float  varmin 
)

Execute varmin_mvg1() for all mvgs in the hmm.

Returns
0 on success, -1 on failure.
int spr_renorm_oprob ( SprHmmHmm hmm,
int  state_nr,
float  logeps 
)

Renormalize the (logarithmic) output probabilities for the given state state_nr, so that the total probability equals 1.
Epsilon precision is specified in the log10-domain with logeps.

Returns
0 on success, -1 on failure.
int spr_ct_to_tprob ( SprHmmHmm hmm,
float  mincount,
float  logeps,
float  fac 
)

Estimates transition probabilities from counts and smooth with old probabilities.
mincount is the minimal number of frames on which the state counts must be based before a reestimation is done. If the number of frames is less than this limit, the old transition probabilities are kept.
logeps is the minimal probability a transition can get, and is specified in the log10-domain.
fac is the weight given to the new probabilities and must be a number between 0.0 and 1.0.

Returns
0 on success, -1 on failure.
int spr_ct_to_prob ( SprHmmHmm hmm,
float  mincount,
float  varmin,
const char *  pool,
float  logminno,
float  logminsp,
int  rel_eps,
float  logmintr,
float  smoothing 
)

Update the acoustic model (transition probs, observation probs and gaussians) based on the counts. mincount is the minimal number of frames on which the state counts must be based before a reestimation is done. If the number of frames is less than this limit, the old model parameters are kept.
varmin specifies a lower bound on sqrt(variance) for each Gaussian relative w.r.t. the weighted average variance. The pool string regulates how the gaussian variances are pooled. See spr_ct_to_mvg1() for details.
smoothing is the weight given to the new probabilities and must be a number between 0.0 and 1.0.
logminsp is the minimal probability an observation can get. logminsp is the minimal probability an observation can get for the silence states. logmintr is the minimal probability a transition can get. logminsp, logminsp and logmintr are specified in the log10-domain.
When rel_eps is not 0, logminsp is a relative value; see ct_to_oprob2() for details.

Bug:

Flooring value logminno doesn't work if the value given with logminsp is larger: first the minimal output probability is set to the value given with logminsp for all states, then it is reset to the value given with logminno for all silence states.

Renormalization is only done for silence states.

SprSegmentation* spr_cwr_path_to_seg ( const SprCwrWordHist *const *  sentence,
const SprCwrNodeSeq node_seq,
const SprSspDesc ssp_des,
const SprCwrSearchSpace search_space,
int  word_markers 
)

Covert a path as generated by cwr_search() to a segmentation. Both a complete sentence (sentence!=NULL) or a single word (<node_seq!=NULL>) can be converted. If the word_markers flag is set, dummy entries will be added to the segmentation to indicate the word boundaries.

SprHmmSeg* spr_cwr_path_to_path ( int **  path,
const SprCwrWordHist *const *  sentence,
const SprCwrNodeSeq node_seq,
const SprSspDesc ssp_des,
const SprCwrSearchSpace search_space 
)

Covert a path as generated by cwr_search() to a path as returned by vitalign(). Both a complete sentence (sentence!=NULL) or a single word (<node_seq!=NULL>) can be converted.

SprSegmentation* spr_cwr_word_seg ( const SprCwrWordHist *const *  sentence,
const SprSspDesc ssp_des,
const SprCwrSearchSpace search_space 
)

Convert the recognition result of a CWR-experiment to a word-based segmentation. Leading and trailing silence will only be removed if the node or phone sequence was stored during recognition.

char* spr_cwr_find_option ( char *  cmd_line,
char *  defaults,
char *  option 
)

Find all strings belonging to the given option and isolate the corresponding values at the end in a separate string.

char* spr_cwr_options_to_cmd_str ( SprStream dest,
char *  cmd_line,
char *  defaults 
)

Convert command line options (hmmiwr, hmmcwr) to commands on the prompt for cwr_main. The cmd_line must be dynamically allocated (e.g. sprintf_) and is deallocated on exit. If a destination file dest is specified (not NULL), all commands are written to the file, otherwise all commands are concatenated in a single string.

Known options and format:

-debug <cmds>
Set some debug info. The debug commands <cmds> have the same format as the command used in the interactive mode. Multiple commands must be separated by a ';'.
-ssp <ssp_scripts>
Specify the signal processing scripts.
-u <ci_fname> <cd_fname>
Specify the context-independent and context-dependent phoneme set.
-d <lex_bin> [lex_txt]
Specify the lexicon (new format only).
-unwind <unwind_flags>
Unwind flags (add noise before and after words, ...). These flags have only effect when the textual lexicon is also specified.
-top_n <top_n>
Use only the best scoring gaussians to calculate the obs. prob.
-rmg <rmg_flags>
Enable the fast selection of gaussians module.
-LMout <lmo>
Set the minimal output probability.
-fast_models [ON/OFF]
Do a fast evaluation of the acoustic models or not.
-h <hmm>
The hmm file.
-g <mvg>
The corresponding set of gaussians.
-sel <sel>
The corresponding selection (of gaussians) file.
-LM <cnt_fname> [type] [disc_fac]
Construct the language model from the give file. The type is obsolete for the moment (specify xx). The discount factor can be used to control the amount of discounting (set to 0 for no discounting).
-LMcost <A> <B> <C> [cache_len]
Controls the impact of the language model to the total score (see 'cwr_main', 'help set lm' cost for more information). If not specified, the size of the LM-cache is set automatically to a good value.
Returns
The concatenated string (if requested) or (NULL) on error.
Parameters
cmd_linethe command line options
defaultssome default command line options
SprCwrSearchSpace* spr_cwr_search_space_load ( const char *  ci_fname,
const char *  cd_fname,
const char *  lexicon,
const char *  unwind,
const char *  hmm_fname,
const char *  mvg_fname,
const char *  sel_fname,
const char *  acmod_opt,
const char *  top_n,
const char *  rmg_flags,
float  logminout,
const char *  beam_info 
)

Load all information needed for simple alignments of data against given phone sequences or sentences. The beam_info parameter can contain the following options: "threshold" The pruning threshold. "width" The maximum beam width "hash_size" The size of the recombination hash table, a good value is two times the maximum beam width. "word_frac" Fraction of the threshold that should be used for word transitions.

SprCwrSearchSpace* spr_cwr_search_space_free_ ( SprCwrSearchSpace search_space)

Free all information loaded by load_search_space().

void spr_cwr_count_tree_mem_print ( SprStream fd,
const SprCwrCountTree count_tree 
)
SprCwrCountTree* spr_cwr_count_tree_mem_limit ( SprCwrCountTree count_tree,
int  memory_limit 
)

Limit the memory (in kilo-bytes) the count tree can have. If the given limit is exceeded, the count_tree->mem_limit_reached flag in the count tree will be set. A limit of (-1) will set the limit to infinity. This routine must be called before any node is allocated.

Returns
The return value is just a copy of the count_tree input parameter.
int spr_cwr_count_file_assign ( SprCwrCountFile count_file,
const char *  fname,
unsigned int  mode 
)

Attach a file (for reading or writing) to the given count tree. Call this routine with both the file name and the mode set to (NULL) to de-attach the file. Returns a (-1) on error.

Normal value for mode:

SPR_STREAM_READ
open for reading
SPR_STREAM_WRITE
open for writing

Specials:

fname==NULL
Use the default dump name.
mode==SPR_STREAM_AUTORM
Unlink the file.
SprCwrCountTree* spr_cwr_count_tree_free ( SprCwrCountTree count_tree,
int  content_only,
SprMsgId routine 
)

Free all data attached to the count_tree structure.
The content_only flag can have three values:

(-1)
Free (reset) the counts only, not the buffers.
1
Free the content of the count tree.
0
Free the content and the basic structure.
SprCwrCountTree* spr_cwr_count_tree_alloc ( SprCwrCountTree count_tree,
int  depth,
const SprDT type 
)

Allocate a count tree (sparse matrix, with sorted elements). The given depth is the maximum depth (and the depth used by some general routines). The type can be 'INT' or 'FLOAT'. "Note:" If the given maximum depth is 3 or larger, small elements are allocated in large blocks to save memory.

SprCwrCount* spr_cwr_count_read ( SprCwrCountFile count_file)

Read a count from the count file. If no element could be read, the NULL pointer is returned.

int spr_cwr_count_write ( SprCwrCountFile count_file,
const SprCwrCount count 
)

Write a count to the count file. If the count pointer count equals the NULL pointer, the write buffers are flushed. Returns (-1) on error.

SprCwrCount * spr_cwr_count_tree_step ( SprCwrCountTree count_tree)

Traverse the count tree or a sub-tree node by node. Before the first call, the select_count_tree() or reset_count_tree() routine should be called to select the (sub-)tree to traverse.
For each step, the following fileds are filled in on return:

ctree->sample_buf
The sample buffer.
ctree->count_buf
The count buffer (stop_counts and final count).
ctree->xdepth
The number of different elements w.r.t. the previous sample.
Returns
The number of occurances of the given sample (last element in the count buffer) or (NULL) if no more nodes are available.
SprCwrChildInfo * spr_cwr_count_tree_select ( SprCwrCountTree count_tree,
int *  class_seq,
int  match_depth,
int  create_missing 
)

Find a sub tree in the count tree.

int spr_cwr_count_tree_mem_merge ( SprCwrCountTree count_tree)

Merges the count tree in memory with an existing one one disk, dumps the result back to disk and clears the one in memory.

Note
This routines does NOT work for vary-grams.
SprCwrChildInfo* spr_cwr_count_tree_next ( SprCwrCountNode count_node,
int  class_id 
)

Go to the next level by finding the sub-branch for the given class_id. If the sub-branch was not found, a (NULL) is returned.

SprCwrChildInfo* spr_cwr_count_tree_Next ( SprCwrCountNodePtr count_node_ptr,
int  class_id,
int  final_node,
SprCwrCountTree count_tree 
)

Go to the next level by finding the sub-branch for the given class_id. If the sub-branch was not found, a new one (final or non final according to the final_node flag) will be allocated. If that allocation fails, a (NULL) is returned.

Note
This routine may NOT be called from a final node. See count_tree_Next_() for a solution to this problem.
SprCwrChildInfo* spr_cwr_count_tree_Next_ ( SprCwrChildInfo child,
int  class_id,
int  final_node,
SprCwrCountTree count_tree 
)

Go to the next level by finding the sub-branch for the given class_id. If the sub-branch was not found, a new one (final or non final according to the final_node flag) will be allocated. If that allocation fails, a (NULL) is returned.

int spr_cwr_count_inc ( SprCwrCountTree count_tree)

Update the count tree for the sample stored in the count_tree->sample_buf field.

int spr_cwr_count_tree_print ( SprStream dest,
SprCwrCountTree count_tree 
)

Print the content of the count tree.

void spr_cwr_err_free ( SprCwrErr info)

Free all data attached to info structure (but not the structure itself).

int spr_cwr_err_seq_expand ( SprCwrCESeq seq,
int  add_el 
)

Add a single element add_el to the <seq.seq> array, reallocate if necessary.

SprCwrCEDistMat* spr_cwr_err_dist_free_data ( SprCwrCEDistMat dmat)
SprCwrCEDistMat* spr_cwr_err_dist_mat_read ( const char *  fname,
const SprStrHashTbl dic 
)
SprCwrCEChrDiff* spr_cwr_err_chr_diff_free ( SprCwrCEChrDiff info)
SprCwrCEChrDiff* spr_cwr_err_chr_diff_init ( const char *  options,
int  opt_len,
const SprStrHashTbl ndx2str 
)
Parameters
optionsdefine the options at key=value; pairs
opt_lenlenght of the options string (of (-1) for a '\0' terminated string)
ndx2strhash table use to convert the word strings to indices (may grow/shrink dynamically, but must covert all used words when calling the spr_cwr_err() function)
double spr_cwr_err_chr_diff_func ( const SprCwrCEChrDiff info,
int  ndx_ref,
int  ndx_cmp 
)
int spr_cwr_err ( SprCwrErr info)

Compares the two sequences <info.ref> and <info.cmp> and calculates the minimal number of substitutions, insertions and deletions needed to make them equal. The result is written to <info.cost>, <info.Nsub>, <info.Nins> and <info.Ndel>.
If a full difference report is requested (<info.diff.alen> != 0), the exact alignation is calculated, and the action string that makes both sequences equal is returned in <info.diff.seq>.
If the confusion matrix <info.conf_tree> is a non NULL pointer, the confusion matrix is updated also.

Note
The action string always ends with a DIFF_TERMINATED action.
If the total cost is equal between two alignments, the one with the lowest number of substitutions is chosen.
size_t spr_cwr_fstc_size ( SprCwrFSTSizes fst_sizes,
unsigned int  state_info_size,
unsigned int  state_info_align 
)

Do some sanity checks on the various sizes and calculate the minimum size (file) and an upper limit on the amount of memory needed in memory after adding the 'advanced' output symbols (look-ahead) and the application specific data. The memory needed by the application data is characterized by the following two values:

state_info_size
amount of memory needed per state (in bytes)
state_info_align
alignment required by the data (in bytes)

Returns the max. size.

SprCwrFSTC* spr_cwr_fstc_free ( SprCwrFSTC fst)

Read an FST. The FST will be stored in its compact (static) format. The lexicon for the input and output symbols must be specified.

SprCwrFSTC* spr_cwr_fstc_read ( SprCwrFSTC fst,
const char *  fname,
const char *  options,
const SprCwrSLex lex_isymb,
const SprCwrSLex lex_osymb,
unsigned int  state_info_size,
unsigned int  state_info_align 
)

Read an FST. The FST will be stored in its compact (static) format. The lexicon for the input and output symbols must be specified.

int spr_cwr_fstc_write ( const SprCwrFSTC fst,
const char *  fname,
int  ASCII 
)

Write the FST fst to the file fname. If the flags ASCII is set, the FST is written in ASCII (human readable) format. Otherwise a binary format is used.

void spr_cwr_fstc_clear_visited ( SprCwrFSTC fst)

Clear all visited flags. Note there is only one visited flag per state, so nesting is not possible.

SprCwrFSTC* spr_cwr_fst_static2dyn ( SprCwrFSTC fst,
const char *  fname 
)
SprCwrFSTC* spr_cwr_fst_dyn2static ( SprCwrFSTC fst,
const char *  fname 
)
int spr_cwr_lex_size ( const SprCwrLexDesc lex_desc)

Return the number of elements (nodes+links+...) in the lexicon tree.

void spr_cwr_lex_word_print ( SprStream dest,
const char *  lm,
int  word_nr,
const char *  rm,
const SprCwrLexDesc lex_desc 
)

Print the word corresponding to the given word number word_nr. If the number corresponds to a set of words, the complete set is printed.

Parameters
destdestination file
lmleft margin
word_nrthe word nr
rmright margin
lex_descall lexicon info
SprCwrLexDesc* spr_cwr_lex_desc_info_free ( SprCwrLexDesc lex_desc,
SprMsgId routine 
)

Free the lexicon description. The basic structure itself is not deallocated.

SprCwrLexDesc* spr_cwr_lex_desc_free ( SprCwrLexDesc lex_desc,
SprMsgId routine 
)

Free the lexicon description.

void spr_cwr_lex_desc_print ( SprStream dest,
SprCwrLexDesc lex_desc,
const SprCwrPhoneDesc ph 
)

Print the tree structured lexicon in a linear format.

SprCwrLexNL* spr_cwr_lex_node_next ( const SprCwrLexNL lex_ptr)

Advance to the next node in the lexicon. The nodes are handled in the same order as they are stored in memory, no natural order (traversing the network) is used.

void spr_cwr_lex_desc_dump ( const SprCwrLexDesc lex_desc,
SprStream fd 
)

Dump all information in the compressed/state-based lexicon.

int spr_cwr_lex_desc_check ( SprCwrLexDesc lex_desc,
const SprCwrPhoneDesc ph 
)

Check for errors in the lexicon network.

int spr_cwr_lex_desc_opt_check ( SprCwrLexDesc lex_desc,
const SprCwrPhoneDesc ph 
)

Check if the network is optimal, and calculate the reduction factor that could be achieved with a further optimisation.

SprCwrLexDesc* spr_cwr_lex_desc_read ( SprCwrLexDesc lex_desc,
const char *  lex_fname,
const char *  clex_fname,
const SprCwrPhoneDesc phone_desc,
const char *  unwind 
)

Read the lexicon from a linear lexicon description file or from a compressed lexicon file.

The unwind string is a semi-column separated list of statements having the following format: <property>=<value>.
The following properties can be set:

[Unwind_options]
check_lvl=<I32:val>
Check whether the lexicon is correct (level>=0) and optimal (level>=1).
add_in_front=<String:val>
Add a specified phone sequence in front of all word/sentence descriptions.
add_between=<String:val>
Add a specified phone sequence between all words in a sentence description.
add_at_rear=<String:val>
Add a specified phone sequence at the rear of all word/sentence descriptions.
sent_context=<String:val>
Alignment: a simple phone sequence (no optional sequences) used as context before (and after) a sentence for the CI-phone to the CD-phone conversion (not applied with the assimilation rules).
sil_word=<String:val>
Recognition: a word used for marking valid start (all paths extending from that words) and end sequences (all paths going to that word).
assimilation=<String:val>
Use the specified file with assimilation rules.
apply_Wrules=<String:val>
Apply only those within-word rules that have any of the specified characters set. By default all rules are applied within-word.
apply_Arules=<String:val>
Apply only those across-word rules that have any of the specified characters set. By default all rules are applied across-word.
cross_word=<no/yes>
(Do not) allow cross-word CD-phones (value: yes/no). By default cross-word CD-phones are allowed.
quin_patch=<I8:val>
Recognition: Set to a value of 2 to use cross-word quinphoneseven for sequences of words that consist out of a single phoneme. To allow this, the single phoneme words [spw] and multiphoneme words [mpw] are isolated and reorganized in a new network as follows:
ROOT->(s1,s2)
s1->spw->(s2,s3)
s2->mpw->(s1,s2)
s3->spw->(s1,s2)
Alignment: allow to cross up to the given number of word boundaries in a match (gives no problems since the network for aligment is non cyclic).
print_info=<none/some/all>
(Do not) print advance information while converting the lexicon network (values=all/some/none). By default no advance info is printed.
lc_weight=<I32:val>
Number between [-1024,1024] giving more or less importance to the left (positive values) or right context. By default the left context is given some preference (lc_weight=1).
old_multi_pron
Support the old way of specifying multiple pronunciations, i.e. multiple entries for the same word.
no_wsep
Do not separate the words by a dummy START state. This allows to look across two word boundaries (normal operation only allow one word boundary, which may give problems when quinphones are used).
graph_ext=<I8:val>
Character to indicate grapheme extensions. Default: '('.
xO<I32:val>
Optimization level (0=NO, 1=Normal, 2=Full,default).
RExO
Redo the network optimisation when loading the binary lexicon.
Note
The unwind description may not contain white-space characters.
SprCwrLexDesc* spr_cwr_lex_desc_scan ( SprCwrLexDesc lex_desc,
SprCwrPhoneDesc phone_desc,
const char *  unwind,
const char *  lex_fname 
)

Read the lexicon from a linear lexicon description file, but do not decode the description. The phone description phone_desc is stored for later use.

int spr_cwr_lex_sent_to_trellis ( SprCwrLexDesc lex_desc,
const char *  sentence,
int  word_level 
)

Convert the string sentence to a lexicon network (applying unwind rules, assimilation rules). If word_level!=0, sentence is assumed to be a sequence of words seperated by a '_', otherwise sentence is must be a phone sequence.

Returns
0 on success and -1 on failure.
int spr_cwr_lex_node_expands_to ( SprCwrLexNL lex_ptr,
SprCwrLexNL to 
)

Check if the given start node lex_ptr expands to the requested end node to. START_NODE's are checked but are not traversed. The routine assumes that the from and to node differ (no trivial match).

char* spr_cwr_phone_desc ( char *  word_str,
SprCwrLexDesc lex_desc,
SprCwrPhoneDesc ph,
int  compact,
int  wexpand_flags 
)

Give all possible phone sequence belonging to a given sentence (mode1) or network (mode2, internal use only). If no sentence word_str is given, the 'scratch' network pointed to by the lex_desc->concat_mode pointer is converted. If the compact flag is set, the network wil be compacted before the conversion to a bracketted expression. This gives compacter expression, but they reflect less the actual lexicon network. The wexpand_flags control the possible phones at the begining and at the ending of the given word string (FSILxSTART, FSILxEND).

Returns
The string describing the network, all word indications are replaced by a single space. A NULL pointer is returned on error.
Note
In mode2, the 'scratch' network if deallocated, and the lex_desc->concat_mode pointer is set to NULL.
int spr_cwr_lexicon_print ( const char *  dest,
SprCwrLexDesc lex_desc,
SprCwrPhoneDesc ph,
int  wexpand_flags,
SprStream progress 
)

Print the lexicon in the standard format. If the progress file descriptor is not NULL, a progress bar will be shown also.

SprCwrPerp* spr_cwr_perp_close ( SprCwrPerp pp,
int  deallocate 
)

Reset the search space (dynamic programming) used to find the best possible class alignment, and if the deallocate flag is set, free all allocated structures as well.

SprCwrPerp* spr_cwr_perp_open ( SprCwrPerp pp_in,
const SprCwrLMInterface lmi,
SprCwrLMInstance *  lm_data,
SprCwrSearchLmcHash lmc_hash 
)

Initialize (+ optionally allocate) the 'SprCwrPerp' structure needed to calculate the perplexity.

int spr_cwr_perp_init0 ( SprCwrPerp pp,
int  sos 
)

Set the start condition for evaluating a new word sequence to either an empty condition ('sos'==0) or to '<s>' (otherwise).

Returns
(-1) on error and 0 otherwise.
void spr_cwr_perp_init1 ( SprCwrPerp pp)

Reset all scores to zero. This allows one to push a complex initial condition. The number of words seen so far is stored in pp->hdr_cnt, after which this word counter (pp->wrd_cnt) is reset to zero.

int spr_cwr_perp_add_word ( SprCwrPerp pp,
int  word_id 
)

Expand the word sequence with one word.

Returns
(-1) on error and 0 otherwise.
int spr_cwr_perp_add_wordset ( SprCwrPerp pp,
int  first_wid,
int  last_wid 
)

Expand the word sequence with one word, but the exact word ID is unknown.

any word in the range [first_wid,last_wid] is tested

Returns
(-1) on error and 0 otherwise.
int spr_cwr_perp_cadd_eos ( SprCwrPerp pp)

Add an extra '</s>' symbol of none of the tokens are in a sentence end stata. Note: this approach does not work for LMs that allow sentences end to sentence start mapping (see e.g. the "eos0 ..." option in cwr_lm_ext.c)!

Returns
(-1) on error, 1 if an extra '</s>' was added, and 0 otherwise.
int spr_cwr_perp_get_opt_seq ( SprCwrPerp pp,
float *  score 
)

Find the best scoring class sequence matching the given word sequence.

Returns
(-1) on error and the number of words in the word sequence (excluding the start sequence
See Also
spr_cwr_perp_init1()).
int spr_cwr_perp_sent ( SprCwrPerp pp,
SprCwrWordSeq word_seq,
int  cond_sz 
)

Find the best scoring class sequence matching the given word sequence and calculate the perplexity of this class sequence. If cond_sz is not 0, the first cond_sz words are used as start condition. A value of (-1) corresponds to '<s>' as start condition.

Returns
(-1) on error and the number of words, excluding the start sequence cond_sz.
float spr_cwr_perp_test ( const char *  fname_cor,
const SprCwrLMInterface lmi,
SprCwrLMInstance *  lm_data,
const SprCwrSLex lex,
const char *  lmc_start,
const char *  lmc_end,
SprStream report 
)
Parameters
fname_corcorpus containing the sentences
lmithe language model
lm_datathe language model
lmc_startsentence start LM-context
lmc_endsentence end token(s)
reportwrite a detailed report to this file
int spr_cwr_lm_query ( SprStream fd,
int  what,
const SprCwrLMInterface lmi,
SprCwrLMInstance *  lm_data,
const SprCwrSLex lex,
const char *  context_str,
const char *  word_str 
)

Query the language model.

SprCwrARule* spr_cwr_assimil_rules_free ( SprCwrARule rules)
void spr_cwr_assimil_rules_print ( SprStream fd,
const char *  lm,
const SprCwrARule rules,
SprCwrPhoneDesc ph 
)
void spr_cwr_assimil_rule_print ( SprStream fd,
const SprCwrARule rule,
const SprCwrPhoneDesc ph 
)
SprCwrPhoneDesc* spr_cwr_phone_desc_read ( SprCwrPhoneDesc phone_desc,
int  set_node_info,
const char *  ci_fname,
const char *  cd_fname 
)

read_assimil_rules

Format of the rules:
  - change:      <name>  [] ==> [] / [][]*_[]  [W=...;][A=...;]
  - add variant: <name>  [] +=> [] / [][]*_[]  [W=...;][A=...;]
with
  - []  required set of phonemes
  - []* optional set op phonemes
  - '|' the word end marker
Flags:
 W: Within word flags
 A: Across word flags
Application of the rules:
  - The rules are applied in sequence
@endvarbatim
*/
int spr_cwr_assimil_rules_read(
/*!
 returned rules    */
SprCwrARule**rules,
/*!
 file to read from */
const char*fname,
/*!
 the phoneme set */
const SprCwrPhoneDesc*ph);

/*!
@ingroup API_LowLvl__lib__cwr
Free all data concerning the context independent and context dependent phonemes.
The basic structure itself is not deallocated.
*/
void spr_cwr_phone_desc_info_free(SprCwrPhoneDesc*phone_desc,SprMsgId*routine);

/*!
@ingroup API_LowLvl__lib__cwr
Free all data concerning the context independent and context dependent phonemes.
*/
SprCwrPhoneDesc*spr_cwr_phone_desc_free(SprCwrPhoneDesc*phone_desc,SprMsgId*routine);

/*!
@ingroup API_LowLvl__lib__cwr
@brief Print the node information to a file. Used for debugging only.
*/
void spr_cwr_node_info_print(SprStream*dest,const SprCwrPhoneDesc*phone_desc);

/*!
@ingroup API_LowLvl__lib__cwr
@return the number of nodes (states) in a (CD)phone.
@note this function is rather slow
*/
int spr_cwr_cd_nr_nodes(const SprCwrCDPhone*cd_phone);

/*!
@ingroup API_LowLvl__lib__cwr
Reorder the list of context dependent phones attached to each context
independent phone, so that the largest contexts are putted in front.
The extra weighting (in addition to 1024) of the left (front) context w.r.t.
the right (tail) context is controled by the <b><span class="paramname">left_context_weight</span></b> parameter.
The <b><span class="paramname">left_context_weight</span></b> parameter is bounded to the region [-1024,1024].
*/
int spr_cwr_cd_phones_resort(SprCwrPhoneDesc*phone_desc,int left_context_weight);

/*!
@ingroup API_LowLvl__lib__cwr
Reads the names of the context independent phones and reads and decodes the
description of the context dependent phones.
If the input phone description structure is NULL, it will be allocated.
if the <b><span class="paramname">set_node_info</span></b> flag is set, the node information is also extracted.
 <dl><dt><b>File format for the CI-description file:</b><dd>
        A standard key-file, each entry gives the name of a CI-phone.
        @verbatim
Example:
  .key
  NENTRY   4
  WORD_SEP |
  SIL_STR  #
  WORD_EXT .
  DESCRIPTION the CI-phone set
  #
  a
  b
  #
  .

File format for the CD-desc. file: A standard key-file, each entry gives the name of the CD-phone, its description and optionally a list of state numbers making up the given phone.

The description has the following format:

desc. = [left_context]-<central_phone>-[right_context]
context = [phone_list]...[phone_list ]

The list of state numbers has the following format:

<number_of_states> [list_of_state_numbers]
Example:
  .key
  NENTRY      4
  PHONE_DELIM _
  DESCRIPTION the CD-phone set
  #
  A1   [b]-a-[b]   3 0 1 2
  A2      -a-      3 3 1 4
  B1   [b][a]-b-   3 5 6 7
  B2         -b-   3 8 6 9

If no list of state numbers is given, state numbering is continued from they highest state number encountered before.

Note that for both the CI- and CD-desc. file, a phone delimiter can be specified. If another word separator than the default one (i.e. '|') must be used, it can be specified by the 'WORD_SEP' key in the CI-desc. file.

Returns
A pointer to the phone description information or (NULL) on error.
Parameters
ci_fnamefile describing the CI-phones
cd_fnamefile describing the CD-phones
const SprCwrCDPhone* spr_cwr_phone_str2cd ( const SprCwrPhoneDesc phones,
const char *  phone_str,
int  phone_str_len 
)

Find the context dependent phone info for a given context dependent phone name phone_str of length phone_str_len. If phone_str_len equals -1, the full length of the string is used.

Returns
the context dependent phone info or NULL on error.
const SprCwrNodeInfo* spr_cwr_phone_str2cds ( const SprCwrPhoneDesc phones,
const char *  phone_str,
int  phone_str_len,
int  state_ndx 
)

Find the state index for a given context dependent phone name phone_str of length phone_str_len. If phone_str_len equals -1, the full length of the string is used. If the specified logical state number state_ndx equals (-1), phone_str is assumed to end with a '#'state_ndx suffix from which the logical state number will be retrieved. Otherwise, phone_str is assumed to have no such suffix.

Returns
the state info (number and flags) or (NULL) on error.
int spr_cwr_phone_desc_purge ( SprCwrPhoneDesc phone_desc,
int **  ci_xlat_rv 
)

Remove all CI-phones for which no context dependent realisations are found. If ci_xlat_rv is not NULL, then also return the translation table. This table contains the new index for every original CI-phone index. A (-1) value indicates that this CI-phone was removed.

Returns
0 on success and -1 on failure.
Note
a warning is given for each problematic CI-phone.
int spr_cwr_phone_desc_write ( SprStream dest,
SprCwrPhoneDesc ph,
int  used_only,
int  ignore_node_info 
)

Dump the CD-phone description for the given phone description ph to file dest. When the used_only flag is set, only those phone that are marked as being used (in expanding the lexicon) are output. When the ignore_node_info flag is not set, the low level node information in also dumped.

Returns
0 on success, -1 on error.
void spr_cwr_node_seq_print ( SprStream dest,
const char *  lm,
const SprCwrNodeSeq node_seq,
const char *  rm,
const SprCwrSearchSpace search_space 
)

Print the given node sequence in textual format.

Parameters
destdestination file
lmleft margin text
node_seqnode sequence
rmright margin text
void spr_cwr_sent_print ( SprStream dest,
const SprCwrWordHist word_hist,
const SprCwrSearchSpace search_space 
)
int spr_cwr_tokens_check ( const SprCwrSearchSpace search_space,
SprCwrHashP2X ctoken_htbl,
SprCwrHashP2X whist_htbl 
)

Check the token lists for errors and inconsistencies.

int spr_cwr_search_space_check ( const SprCwrSearchSpace search_space)

Check the search space for errors and inconsistencies.

int spr_cwr_search_info_reset ( SprCwrSearchSpace search_space,
int  spkr_id 
)

Clear all data used for the beam search. This routine should be called whenever it is undesired to continue the recognition from the point where the previous recognition stopped. If the spkr_id is non-negative, then a speaker configuration for that speaker is maintained, and swithing back to the same spkr_id will reload the same search settings.

Returns
(-1) on failure (out of memory), and 0 otherwise
Parameters
search_spacethe search space
spkr_idkeep the same settings for a user
void spr_cwr_gauss_limit ( SprCwrSearchSpace search_space)

Unmark all gaussians that are not used in the lexicon/trellis. The search_space->std.gauss_sel bitmap flag indicates the requested actions: bit 0: if set, do gaussian selection bit 1: if set, initialize (must be done when the acoustic model changes)

void spr_cwr_search_info_compact ( SprCwrSearchSpace search_space)

Clear all data used for the beam search and deallocate all unnecessary data, freeing up as much memory as possible.

void spr_cwr_search_space_parts_print ( SprStream dest,
const char *  lm,
int  parts_mask,
const char *  rm 
)

Use to print loaded or missing parts in the search_space structure. If lm equals NULL, it will default to "\\tmissing parts: ". If rm equals NULL, it will default to "\\n".

Parameters
destdestination file
lmtext to put as left margin
parts_maskall parts to list
rmtext to put as right margin
int spr_cwr_search_space_modify ( SprCwrSearchSpace search_space,
unsigned int  action,
  ... 
)

Modify some parameters that control the search strategy. The action flag must be one of the possibilities listed below.

Possible actions:

SEARCH_CHANGE_START
Start one or more modifications to the search space. If the check flag is set, some extra checks are done to ensure that the search space is still alright after the changes (is somewhat slower).
Extra info: check (int)
SEARCH_CHANGE_STOP
End the modifications to the search space. By encapsulating every set of modifications with a START/END command, the the cleanup of the search space as concentrated and fast as possible.
Extra info: rv_OK (int)
Returns rv_OK if no errors occur and (-1) otherwise.
LOAD_PHONES
Load a (new) phone set.
Extra info: CI-fname (char*) and CD-fname (char*)
See read_phone_desc() for more details.
UNLINK_LEX
Un-install the lexicon.
Extra info: /
LINK_LEX
Install a (new) lexicon.
Extra info: the new lexicon-structure (LexDesc*) to load.
UNLINK_LM
Unlink the language model. This operation must be followed immediatly by a LINK_LM (after the new LM is loaded).
Extra info: /
LINK_LM
Link a loaded language model.
Extra info: a resource descriptor (SprCwrSRMDesc*) and the language model (void*). See cwr_lm_interface for more details.
LOAD_FHMM
Load a new hmm with the new routines for fast evaluation.
See LOAD_HMM for more details.
LOAD_HMM
Load a new hmm.
Extra info: a resource descriptor (SprCwrSRMDesc*), HMM-fname (char*), MVG-fname (char*), SEL-fname (char*), load options (char*), top_n (char*), rmg_flags (char*), logminout (float), asf (float), cvt-flags (int).
See read_new_hmm() for more details.
SEARCH_MAX
Set the parameters that control (or depend on) the maximum search effort.
Extra info: the pruning threshold (float), the fraction of the threshold that should be used when new words will be started (float), the maximum beam width (int), the size of the LM-cache (int), and the size of the LM-context recombination hash table (int).
note: Specifying a value of -1 for the LM-cache and LM-context parameters results in default values.
SEARCH_MIN
Set the minimum beam-width and the maximum fraction the threshold may increase to insure the requested minimum beam-width.
Extra info: the minimal beam width (int) and the threshold overshoot fraction (float).
SEARCH_MODE
Set the recognition mode (IWR, CWR or CSR).
Extra info: the recognition mode (int).
SEARCH_LMI
Specify the interaction with the language model, i.e. set the weighting of the LM versus the acoustic model (the total score equals log(ac.lik.)+A*log(LM_prob)+C), and set the LM-forwarding mode (FWD_NONE, FWD_UNI, FWD_LTD or FWD_FULL).
Extra info: the parameters A and C (2 floats) and the LM-forwarding mode (int).
SEARCH_CONTRAINT
Constraint the search space, i.e. define whether to give preference to hypotheses ending in a sentence end word (END_SEND), in a word end state (END_WEND), or give no preference at all (END_ALL). Furthermore, define whether to start the recognition only with nodes that can be reached from a given silence word and/or give preference to those end states that can be followed by a given silence word. And finally, specify the maximum number of empty words (i.e. a word with no acoustical evidence) that can be insterted in a row during recognition.
See also CWR_best_sentence() and read_lex_desc().
Extra info: the sentences end condition (int), a flag (values 1 or 0) for turning on the extra start and end conditions (2 ints), and the maximum number of empty words (int).
SEARCH_TRACE
Store/don't store (STORE_NOTHING) the recognized sequence of phones (STORE_PHONES) or nodes (STORE_NODES).
Extra info: the info to store (int).
WLAT_HANDLER
Set the routine that will handle word graphs.
Extra info: the adress of the write routine (WlatWrite), the write delay (int), the garbage_collector delay (int), configuration string to indicate whether the node sequences must be retained in the word lattice or not (char*), an extra configuration string for the writer (char*) and the frame shift (double).
note: A NULL pointer as write routine removes the previous handler.
BEAM_HANDLER
Install a trap-handler to extract detailed information on the search beam at every frame.
Extra info to install a handler: the trap handler (function pointer, void *(fun)(int,struct t_SearchSpace,void*,void*,int)) and some setup information (void*). Optionally, the handler id (int), and a modification id (int).
The return value is a handler id (>1) that can be used to remove, modify or query the handler later on.
Extra info to remove a handler: a NULL trap handler, a NULL pointer as information and the id of the handler. An id (-1) means all handlers, (0) means the last added handler.
Extra info to modify/query a handler: a NULL trap handler, a non NULL information/result pointer (void*), the id of the handler and an extra integer to specify the specific modification/query. An handler id (-1) means all handlers, (0) means the last added handler.
Returns
(-1) on error and 0 on success (unless stated otherwise in the detailed information).
Parameters
actionspecified action
SprCwrSearchSpace* spr_cwr_search_space_free ( SprCwrSearchSpace search_space,
SprMsgId routine 
)

Deallocates all info attached to the search_space structure.

Returns
(NULL).
SprCwrSearchSpace* spr_cwr_search_space_new ( void  )

Allocate a new (empty) search_space structure.

Returns
The allocated search space, or (NULL) on error.
SprCwrToken* spr_iwr_best_word ( int  top_n,
SprCwrSearchSpace search_space 
)

Find the best scoring tokens when operation in Isolated Word Recognition mode. Information about the top_n best tokens is copied into dummy word history info block. "Note1:" If there are not enough words that have there end frame in the beam, the returned array will contain less words than requested, "Note2:" If there are no words that have there end frame in the beam a dummy result with as word id PARTIAL_WORD, will be constructed having the best score in the beam. "Return value:" The best scoring token, or (NULL) on failure.

SprCwrToken* spr_cwr_best_sent ( SprCwrSearchSpace search_space)

Retrieve the best scoring sentence. If the search_space->sent_end_flags flag equals (END_SEND), privilege will be given to sentence final hypotheses (words reflecting to the SENTENCE_END class).

If the search_space->sent_end_flags flag equals END_WEND), privilege will be given to word final hypotheses. If the best hypothesis does not end in a word final node, the (unknown) word id will be replaced by <PARTIAL_WORD>.

Returns
(NULL) on error, otherwise the final hypothesis used for backtracking is returned.
The search_space->recog_result pointer points to the the recognized sentence. The sentence is ended with a (NULL) as terminating element.
SprCwrToken* spr_cwr_find_best_token ( SprCwrCToken **  Best_ctoken,
SprCwrSearchSpace search_space 
)
int spr_cwr_data_process ( SprStream dfptr,
int  nfr,
SprSspDesc ssp_des,
SprCwrSearchSpace search_space 
)

Recognize a given amount of data.

Returns
the number of frames on success and (-1) on error.
Parameters
dfptrdata file pointer
nfr#frames to process
ssp_dessignal processing
search_spaceall hmm & search info
SprCwrSLex* spr_cwr_slex_free ( SprCwrSLex lex,
SprMsgId routine 
)

Free a set of lexicon names.

SprCwrSLex* spr_cwr_slex_alloc ( SprCwrSLex lex,
int  nr_words,
int  wlen_tot 
)

Allocate and/or initialise the set of lexicon names.

int spr_cwr_sum_str_len ( const SprCwrSLex lex)

Returns the sum of the string-lengths of all words in the lexicon, the final '\0' inclusive.

SprCwrSLex* spr_cwr_slex_dup ( SprCwrSLex lex_dst,
const SprCwrSLex lex_src 
)

Copy the words from lex_src to lex_dst. If lex_dst is NULL, all info is copied form lex_src. If lex_dst is not NULL, only the word info is copied.

Returns
Allocate and/or initialise the set of lexicon names.
SprCwrSLex* spr_cwr_slex1_create ( SprCwrSLex lex,
int  duplicate,
const SprStrHashTbl whash_main,
const SprStrHashTbl whash_ext 
)

Allocate a set of lexicon names. Make a structure containing all words from whash_main, and if not NULL, all words from whash_ext. If the duplicate argument is non zero, all strings will be duplicated (allocated). Otherwise, we just point to the original strings in the hash tables.

SprCwrSLex* spr_cwr_slex_read ( SprCwrSLex lex,
const char *  fname,
SprKeySet keys,
int  split_phon_desc,
int  unsorted 
)

Read a lexicon and sort the words. If a pointer to a keyset is given, that keyset is used to save the keys. If the split_phon_desc flags is set, the (optional) phonetic description (i.e. the second field) is separated from the first field by a '\0'.
If the split_phon_desc flag has the value (-1), the phone description is optional, if the flag is (+1), the phone description is required.
If the unsorted flag is set then the lexicon will not be sorted. This means that the search routines will NOT work.

int spr_cwr_slex_dump ( SprStream fd,
const SprCwrSLex lex 
)

Dump the lexicon to a file and return the number of bytes written.

const char* spr_cwr_slex_get_word ( int  word_id,
const SprCwrSLex lex 
)

Convert the word id to the corresponding word string.

int spr_cwr_is_html_marker ( const char *  word,
int  len 
)

Determines if the given word is an special html marker or a normal word. If the word is an html marker, the code of the marker is returned, otherwise a zero is returned.

int spr_cwr_get_word_id ( SprCwrWordSet word_set,
const char *  word,
int  len,
const SprCwrSLex lex,
int  notify_level 
)

Get the id. number of a given word word. The word length may be specified by its length len or the string may be '\0' terminated (len == -1). The lexicon lex is specified by a sorted array of words and the number of words. If the word was not found in the specified library, an default set of special words is scanned (resulting in negative indexes).
If the word is still not resolved, it is replaced by '<UNK>' and the complete cyclus is repeated. As '<UNK>' is one of the special words, this cyclus can only be repeated ones. This substitution is reported at the given level notify_level. If the level equals (SPR_ERROR) the substitution is not performed and (-1) is returned.

Returns
(-1) on error, (1) if the word is substituted, and (0) otherwise.
A given input word can also reflect to multiple words (if no GRAPHEME_EXTENSION is given). In that case, the index of the first matching word is set in the word_set->first_wid field, and the index of the last matching word is set in the word_set->last_wid field.
void spr_cwr_word_set_print ( SprStream dest,
const SprCwrWordSet word,
const SprCwrSLex lex 
)

Print all words in a word_set.

int spr_cwr_word_seq_decode ( SprCwrWordSeq word_seq,
const char *  word_str,
const SprCwrSLex lex,
int  notify_level 
)

Decode the given sequence of words, and create an array with the corresponding id numbers. If the word delimiter in the lexicon structure lex is NULL, an underscore will be used as delimiter. "Note:" The array gives extra room for an extra stop element. "See also" get_word_id.

SprAcmod* spr_am_dft_read ( const char *  hmm_fname,
const char *  mvg_fname,
const char *  sel_fname 
)

Read the HMM transition probs and state priors.

void spr_fmvg_dump ( SprStream fd,
const SprHmmFGset gset 
)
int spr_check_keys ( const char **  key_desc,
SprKeySet keys,
SprMsgId routine,
const char *  fname 
)

Check if the keyset keys contains the necessary keys and approriate values. Problems are reported under the funtion name routine and as if the keys were read from fname. The list key_desc contains the required keys and must be structured as follows:

const char *check_these_keys[] =
{"KEY1", "EXPECTED_VALUE",
"KEY2", "EXPECTED_VALUE|ALTERNATIVE_VALUE|...",
"KEY3", NULL, // a key which must be present but with unspecified value
NULL // terminate with a NULL pointer as key
};
Returns
0 if all was OK, (-1) otherwise.
float* spr_fmvg_mg_prob ( const float *  x,
SprAcmod *restrict  gset,
float *restrict  pvec 
)

Compute the gaussian probabilities given the observation vector x for all gaussians marked active in the 'gset->sel' array. The result is put in 'gset->pvec', with a zero for all non selected gaussians.

float* spr_fmvg_output_prob ( const float *  x,
SprAcmod *restrict  gset,
float *restrict  oprob 
)

Compute the gaussian probabilities given the observation vector x for all gaussians marked active in the 'gset->sel' array, and use these probabilities to evaluate the state probs.

float* spr_fmvg_output_prob_mo ( const float *  x,
SprHmmFGset *restrict  gset,
float *restrict  oprob 
)

Same as fast_output_prob(), but in the case of multiple observations per vector.

float* spr_fmvg_log_oprob ( SprAcmod *restrict  gset)

Convert the linear probs given by fast_output_prob() to log(10) probs, based on the state_sel array.

SprAcmod* spr_fmvg_read ( const char *  hmm_fname,
const char *  mvg_fname,
const char *  sel_fname 
)

Read a set of gaussians from the file mvg_fname, and if requested (hmm_fname not NULL) add the HMM information (states). If hmm_fname and sel_fname may be empty strings, the base of mvg_fname is taken and extended with the apropriate extension. If mvg_fname is NULL, the hmm_fname is used to find the corresponding gaussian set.

int SPRaak_debug ( const char *  fname)

Redirect the error and debug information to the given file. #return 0 on success and -1 on failure (file could not be opened).

int SPRaak_tmpdir ( const char *  tmpdir)

Set the temporary directory to the given value.

Returns
0 on success and -1 on failure (out of memory).
void spr_conv_weight_log2lin ( SprHmmStates states)
void spr_conv_trans_log2lin ( SprHmmStates states)
void spr_conv_weight_lin2log ( SprHmmStates states)
void spr_conv_trans_lin2log ( SprHmmStates states)
SprAcmod* spr_am_mdt_read ( const char *  hmm_fname,
const char *  mvg_fname,
const char *  sel_fname 
)

Read the back-end gaussians from the file mvg_fname, and if requested (hmm_fname not NULL) add the HMM information (states). If hmm_fname and sel_fname may be empty strings, the base of mvg_fname is taken and extended with the apropriate extension. If mvg_fname is NULL, the hmm_fname is used to find the corresponding gaussian set.

Note
the missing data specific part are load later on via the 'options'.
void spr_mvg_mg_prob ( const float *  data,
const SprHmmMvgs mvgs,
int  start,
int  stop 
)

Compute the gaussian probabilities given the data for the subset of the gaussians in the array mvgs->mvg[] starting from start up to the gaussian before stop, if it is selected with the array mvgs->selected (1 for selection, 0 else). The result is put in mvgs->pvec, writing a zero for all not selected gaussians in the [start,stop[ set.

void spr_mvg_mg_floor ( SprHmmMvgs mvgs,
int  nsel,
double  logminout 
)

Does flooring of the gaussian probs: logminout is relative to the mean probability of the gaussians and to a scale logarithm of the mean weight for the gaussians in output probability calculations (1/nsel).

void spr_mvg_mg_sort ( double *  pvec,
int  start,
int  stop,
int  top_n,
int *  index,
double *  ptop 
)

Put the best top_n probabilities, found from positions start up to stop-1 in the probability array pvec, at the beginning top_n positions of array ptop (not necessarily sorted). The array index gives at the corresponding places the index (w.r.t. start) of the probability in pvec. The length of arrays ptop and index should be at least min(top_n,stop-start).

void spr_am_output_prob ( char *  dptr,
SprHmmHmm hmm 
)

output_prob() calculates output probabilities for the given data (dptr). Only the output probabilities for the states selected in 'hmm->states->selected' are calculated, and returned in 'hmm->states->output_prob'. The returned values are given in 10-log.

dptr
datapointer: points to 'hmm->total_ovlen' parameters, floats for SC_HMM and CD_HMM, shorts for DD_HMM.
hmm->states
structure describing the states of the HMM. The probabilities in 'hmm->states->state[]->weight' are logarithmical for DD_HMM, linear else. 'hmm->states->logminout' gives minimal output probability. It is absolute for DD_HMM and CD_HMM. For SC_HMM, it is additional to an offset that takes into account the average probability of the gaussians and the average weight for these gaussians.
hmm->mvgs
structures describing the sets of gaussians in continuous cases. 'hmm->mvgs[]->top_n' gives the number of mixtures taken into account when calculating an output probability. Array 'hmm->mvgs[]->selected' is an array with 1 for each gaussians that should be evaluated to calculate the output probabilities for the given states. For SC_HMM 'hmm->states->state[]->state2mvg' gives for a state the indices for the gaussians corresponding to the weights in the state. Only if all gaussians are contibuting to the total output probability, the top_n values can be used.
SprSegmentation* spr_path_path2seg ( int  nfr,
int *  path,
SprHmmSeg udes,
SprHmmSegs units,
int  subunits,
SprSspDesc ssp_des 
)

Converts a local path description into a segmentation. All segment spelling strings will be allocated: 'unit_name' for UNITS mode, 'unit_name'#'state_nr' for SUBUNITS mode (state_nr: 0..nstates).
On the success the segmentation is returned, otherwise a (NULL) is returned.

Parameters
nfrnr of frames in the path description
pathlocal path description
udessegment description at unit level
unitsall units
subunitsask SUBUNITS segments
ssp_desfshift, fname, ...
SprSegmentation* spr_path_seg_step_down ( SprSegmentation seg_in,
const SprHmmSegs units,
const SprHmmSegs vocab 
)

Converts a segmentation on a given level to a segmentation on an lower level. If a segment on the high level is expanded to more segments on the low level, the frames/time in the high segments are divided uniformely over the low level segments. If the vocab pointer is not NULL, the segmentation is converted from the word level to the unit level. Otherwise, the segmentation is converted from the unit level to the state level.

Note
The continuous and discrete time indications are modified independently. This gives a small discrepancy between both indications.
If a conversion from word level to units level is requested, the 'xx' unit may be used as a valid word also, even if not included in the vocab array.

If a conversion to the state level is requested, and the original segmentation was already on the state level, the original segmentation seg_in is returned. For all other error's, a (NULL) pointer is returned.

int spr_phon_lib_len ( const char *const *  phonlib)
char** spr_phon_lib_free ( char **  phonlib,
SprMsgId routine 
)

Release the memory occupied by the phoneme library.

void spr_phon_lib_print ( SprStream dest,
const char *const *  phonlib 
)

Print the phone library.

char** spr_phon_lib_read ( const char *  fn_phonlib,
SprKeySet **  keys 
)

Read a phoneme library (may contain multiple entries on one line) for the file fn_phonlib.

Returns
The phoneme library (NULL terminated array of strings). If (keys!=NULL), the keyset is stored in *keys.
char** spr_phon_lib_split ( char **  phonlibL,
int *  missing 
)

Split the phonlibrary in its lefthand size and righthand side part. The righthand side is returned, the lefthand side is located in the original libarary. If all or some righthand side entries are empty, a NULL is returned. If all righthand side entries are empty, the missing flag is set (if not NULL).

SprPhonCache** spr_phon_cache_free ( SprPhonCache **  phoncache,
SprMsgId routine 
)

Deallocates the memory used by the phoneme quick acces table.

SprPhonCache** spr_phon_cache_make ( const char *const *  phonlib)

Make a quick acces table, based on the first letter.

int spr_phon_get_nr ( const char *  str,
const SprPhonCache *const *  phoncache 
)

Convert a single phoneme string to the corresponding index. On error, a (-1) is returned.

char* spr_phon_scan_nr ( SprPhonNum *  phon_id,
const char *  str,
const SprPhonCache *const *  phoncache 
)

Get the first phoneme from a string of phonemes. The index is returned in *phon_id (if not NULL).

Returns
The string pointer str advanced with the length of the phone, or (NULL) on error.
int spr_phon_str_to_nr ( SprPhonNum **  phon_nrs,
int *  allocated_len,
int  start_pos,
const SprPhonCache *const *  phoncache,
const char *  phon_str,
const char *  phon_delim,
const char *  ignore,
const char *  incl_ignore 
)

Conversion of a given phoneme string phon_str to a sequence of phoneme numbers phon_nrs. The phonemes must be separated with phon_delim character(s). The phon_delim string may be empty or NULL. The ignore characters are not converted to phoneme numbers. The tokens that are also in the incl_ignore string) are coded as minus their ASCII value. The start_pos argument gives the position for the first converted phoneme (concatenate descriptions). The allocated_len argument is the number of integers already allocated.

Returns
The number of phonemes found or (-1) on error.
int spr_phon_find_nr ( const SprPhonNum *  phon_nrs,
int  len,
SprPhonNum  elem 
)

Find a given phone is an array of phone numbers.

void spr_pipe_sync_send ( SprStream sync_out,
int *  sync_counter 
)

sync_send() sends a synchronization signal to the specified file.

Parameters
sync_outfile to send sync-mark to
sync_counteran external sync-counter
int spr_pipe_correct_sync_nr ( int  sync_nr,
int *  sync_counter 
)

correct_sync_nr() Test if the returned sync_nr equals to the last send sync_nr.

Parameters
sync_nrthe received sync-nr
sync_counteran external sync-counter
int spr_pipe_synchronize_ ( SprStream sync_out,
SprStream sync_in,
int *  sync_counter,
SprStream dest_file,
char *  intro_text,
char *  warn 
)

_synchronize() Synchronize child and parent: write a sync-mark to the sync_out file, and wait until the same sync-mark is received from the <sync-in> file. A warning is send to the message system if the first line read from the file sync_in is not the correct sync-mark. This warning can be supressed by setting warn to NULL. All lines received before the correct sync-mark are send to the dest_file, preappended by the string intro_text. This can be disabled if intro_text is set to NULL. If dest_file equals NULL, the lines are echod to the message system. A (-1) value is returned if an End Of File condition is received from the sync_in file.

Parameters
sync_outfile to send sync-mark to
sync_inscan for a reply in this file
sync_counteran external sync-counter
dest_filewhere to send lines before sync
intro_textpreappend to the echoed lines
warnwarning for first non-sync line
int spr_pipe_synchronize ( SprStream sync_out,
SprStream sync_in,
int *  sync_counter 
)

synchronize() Synchronize child and parent: write a sync-mark to the sync_out file, and wait until the same sync-mark is received from the <sync-in> file. An 'Text before sync. mark found.' warning is send to the message system if the first line read from the file sync_in is not the correct sync-mark. All lines received before the correct sync-mark are also send to the message system, preappended by the text 'Received: '.

Parameters
sync_outfile to send sync-mark to
sync_inscan for a reply in this file
sync_counteran external sync-counter
SprRJInfo* spr_rj_free ( SprRJInfo info)

Frees up the memory used by the rejection mechanism. The memory for the rejection mechanism is normaly allocated by init_rj.

Returns
The NULL pointer.
Parameters
infoinformation on rejection
int spr_rj_set_model_link ( SprHmmSegs vocab,
SprHmmSegs units,
int  model_nr,
SprRJInfo info 
)

Searches the rejection information for a given word model and makes the link between the rejection info and the word. These links must be made before rj_set_score can be used.

Returns
-1 on failure, 0 on success.
Parameters
vocabvocabulary
unitsunits
model_nrnumber of the given model
infoinformation on rejection
SprRJInfo* spr_rj_init ( SprHmmSegs vocab,
SprHmmSegs units,
char *  reject_fname 
)

Initialise the rejection mechanisme. Reads and allocates the rejection information from the given file. Scan if the vocabulary and units match to the rejection information in the file.

Returns
A pointer to the initialised structure on success and NULL on failure.
Parameters
vocabknown vocabulary
unitsunderlaying units
reject_fnamefile to read info from
void spr_rj_set_score ( SprRJInfo info,
float *  scores,
int  nfr 
)

Upgrade the score of the rejection model so that the rejection model wins if it should be rejected (according to the used statistics). The upgrade of the rejection score depends on wat the best model was to correct for the changing discrimination power of the different models.

Reject_score = Reject_score +
(mean[best_model] + sigma[best_model] * threshold) * nfr;
Parameters
infoinitialized rejection
scoresmodel scores
nfrnumber of frames used
void spr_frog_sel_bmp_compress ( SprHmmUchar4 *restrict  sel,
int  nmvgs 
)

In-situ conversion of the select array to a bitmapped representation (one bit per gaussian).

void spr_frog_sel_bmp_uncompress ( SprHmmUchar4 *restrict  sel,
int  nmvgs 
)

In-situ conversion of the bitmapped select array (one bit per gaussian) to a non bitmapped representation.

SprHmmRmgInfo* spr_frog_rmg_free ( SprHmmRmgInfo info)

Deallocates all memory allocated to the rmg_info.

int spr_frog_rmg_sel_sum ( const SprHmmRmgInfo info,
const SprHmmUchar4 sel 
)

Count the number of ones in the selection array.

SprHmmRmgInfo* spr_frog_rmg_change ( SprHmmRmgInfo info,
double  margin,
double  sigma 
)

Set a new margin for an initialised RMG-system. Bitmap compression is alway turned off by this routine!

Note
The <info->ndiv> argument is set to the first multiple of 8.
SprHmmUchar* spr_frog_rmg_select_ ( const SprHmmRmgInfo info,
const float *  x,
const SprHmmUchar sel_in,
SprHmmUchar *restrict  sel_out 
)

Makes a new selection array sel_out, based on the input selection array sel_in, with all gaussians having a low probability for the given observation x in one or more directions (axes), removed (flag set to 0). A NULL pointer as input selection array is valid, and is equivalent to an input selection array with all flags on. If sel_out is NULL, the array is allocated. If something fails, the input selection array sel_in is returned otherwise the reduced output selection array sel_out is returned.

Note
This function should only be called via the info->select_rmg_func pointer!
sel_out may be identical to sel_in if sel_in is not NULL
Bug:
If info is NULL, sel_in is simply returned, so a non-NULL sel_out is not filled in.
void spr_frog_rmg_multi_select ( SprHmmMvgs *const *  mvgs,
int  nmix,
const float *  dptr 
)

Perform select_rmg() in the case of multiple observation streams.

int spr_frog_rmg_stats_alloc ( SprHmmRmgInfo info)

Allocate space for extra statistic to determine the effect of all numbers in the info->lst_stats array (redundant or not).

int spr_frog_rmg_stats_read ( SprHmmRmgInfo info,
char *  fname 
)

Allocate the rmg stats (if not yet allocated) and read a set of precalculated stats from disk.

int spr_frog_rmg_stats_write ( char *  fname,
SprHmmRmgInfo info 
)

Dump the rmg stats to disk.

SprHmmUchar4* spr_frog_rmg_stats_select ( SprHmmRmgInfo info,
float *  x,
SprHmmUchar4 sel_out 
)

Select the most promising gaussians (see select_rmg), and update the statistics (see alloc_rmg_stats).

int spr_frog_rmg_stats_cnt ( const SprHmmRmgInfo info,
int  trunc_val,
float *  max_red_loss,
float *  est_red_loss 
)

Count the number of redundant entries in the rmg-array's according to the given truncate value. The values max_red_loss and est_red_loss return the maximal and estimated relative loss in the reduction factor (new_red_fac=old_red_fac*rel_loss). Both pointer may be NULL.

SprHmmRmgInfo* spr_frog_rmg_stats_reduce ( SprHmmRmgInfo info,
int  trunc_val 
)

Remove the redundant entries in the rmg-array's according to the given truncate value.

int spr_frog_rmg_write ( const char *  rmg_fname,
SprAcmod *  gset,
SprHmmMvgs **  mvgs,
int  nmix 
)

Write the rmg-information to a file (or multiple files). The name if the file is derived from the mvg file name by replacing its extension.

SprHmmRmgInfo* spr_frog_rmg_bmp_compress ( SprHmmRmgInfo info,
int  effort 
)

Optimize the order of the gaussians (cluster in groups of 16), and convert to a bitmap representation.

SprHmmRmgInfo* spr_frog_rmg_init ( SprAcmod *  gset,
SprHmmMvgs mvgs,
int  imix,
const char *  rmg_flags 
)

Initialise the rmg_info.

/ RMG_flags od_FRoG

void spr_frog_rmgs_init ( SprHmmMvgs **  mvgs,
int  nmix,
const char *  rmg_flags 
)
void spr_frog_rmg_reduc ( SprHmmRmgInfo info,
const SprHmmUchar sel 
)

Removes unused gaussians (reduced vocabulary, ...). The sel array contains a 1 flag for all gaussians that have to be evaluated. The information for the other gaussians is only dissabled, not removed, so a next call of reduc_rmg() can re-enable previous dissabled gaussians.

void spr_tree_questions_print ( SprStream fptr,
SprTreeQuestions questions,
SprCwrPhoneDesc phones 
)

print_questions() writes a question set questions to a file with file pointer fptr. The phone description phones is needed to print the phone that corresponds to a phone number.

SprTreeQuestions* spr_tree_questions_free ( SprTreeQuestions questions)

free_questions() frees the structure questions. NULL is returned.

SprTreeQuestions* spr_tree_questions_alloc ( int  nquestions)

alloc_questions() allocates and returns a 'Questions' structure with nquestions empty questions. Returns NULL on allocation failure.

void spr_tree_questions_purge ( SprTreeQuestions questions,
const int *  ci_xlat,
SprCwrPhoneDesc phones 
)

Renumber the CI-phones according to the info in ci_xlat. An new index of (-1) means that the CI-phone must be removed.

SprTreeQuestions* spr_tree_questions_read ( const char *  q_file,
SprCwrPhoneDesc phones 
)

read_questions() reads the questions from file q_file into a Questions structure. The phone description phones is used to convert the phones into the corresponding phone numbers. The file with the questions is a key-file, key 'NFR' indicating the number of questions. Each question consists of its name and the sequence of phones for which the question is true. Sample file:

NFR     2
\#
stop    bdgkpt
nasal   ,m,nmnN

Returns NULL on any error.

int spr_tree_state_counts_read ( const char *  count_file,
SprHmmStates states 
)

read_state_counts() reads from file count_file the occupancies of the states which will be tied through the decision tree. Key-file count_file should contain one integer array with as many occupancies as states in the model (key NFR is checked). The occupancies are stored in the correct field in states (sum_ct). Returns -1 on any error, 0 otherwise. Note: in later package versions, the occupancies are stored in the HMM itself, not in a separate file (making this routine useless).

char* spr_tree_context_nr2string ( int  context_nr)

context_nr2string() converts the context number context_nr into the corresponding readable ascii-string:

    ...,-2,-1,0,1,2,...
      is converted to
    ...,2-to-left,left,mid-phone,right,2-to-right,...

The ascii-string is put in a static string and returned.

int spr_tree_context_string2nr ( char *  context_str)

context_string2nr() converts a context-describing ascii-string into the corresponding context number, which is returned. Returns INT_MAX for non-recognised strings.

SprTreeTreeNode* spr_tree_print ( SprStream fptr,
SprTreeTreeNode treenode,
SprTreeQuestions questions,
int  level 
)

print_tree() writes the given tree treenode to the file pointer fptr in the specific format that can be read with read_tree(). Sample tree (note the two types of questions, about context and about node number):

  Question nodes 2 to 2 in unit; 278828 frames; -2e+5 overlap.
    Question front on mid-phone context; 87528 frames; -1e+5 overlap.
      Leaf; 33348 frames.
      Leaf; 54180 frames.
    Question anterior on mid-phone context; 191300 frames; -1e+5 overlap.
      Question fricative on mid-phone context; 154217 frames; -4e+4 overlap.
        Leaf; 56152 frames.
        Question central on mid-phone context; 98065 frames; -2e+4 overlap.
          Question nodes 1 to 1 in unit; 62381 frames; -1e+4 overlap.
            Leaf; 31869 frames.
            Leaf; 30512 frames.
          Leaf; 35684 frames.
      Leaf; 37083 frames.

The questions are needed to convert the question number in the tree structure into the name for that question. This routine is called recursively for the sub-trees, incrementing level: twice level is the number of blanks in front of a line. These blanks are used to enhance the readability of the tree structure, they are not necessary to define the tree uniquely. The printed tree is returned.

SprTreeTreeNode* spr_tree_free ( SprTreeTreeNode treenode)

free_tree() frees a tree structure and returns NULL.

int spr_tree_is_yes ( int  phon_nr,
SprTreeQuestion question 
)

is_yes() checks if phone phon_nr is in the yes-set for question question. If so, 1 is returned, 0 else.

int spr_tree_node_is_yes ( int  node_nr,
int  first_node,
int  last_node 
)

node_is_yes() checks if node number node_nr is in the yes-set for the node question defined by first_node and last_node. If node_nr is in the range [first_node,last_node], 1 is returned, 0 else.

void*** spr_tree_cube_alloc ( int  mats,
int  rows,
int  cols,
int  el_size 
)

alloc_cube() allocates a three-dimensional structure (mats matrices of rows rows and cols columns) with elements with element size el_size. Returns a void pointer to the cube, or NULL on allocation error.

void spr_tree_cube_free ( void *  cube,
int  mats,
int  rows 
)

free_cube() frees a cube with mats matrices and rows rows.

SprTreeTreeNode* spr_tree_read ( SprStream tfptr,
SprTreeQuestions questions,
int *  statenr,
char **  tstr,
int *  tstrlen,
int  itree,
SprCmdBuf cmdbuf 
)

read_tree() reads one decision tree with the format as written by print_tree() from file pointer tfptr and returns the tree structure (NULL on error). With the questions, the question name is converted to its number. statenr is a incrementing counter for the leaves, it is filled in in the tree structure when a leaf is encountered. String *tstr with length *tstrlen, and the command buffer cmdbuf are for decoding. itree, the number of the current tree, is used for debugging.

SprTreeTreeNode* spr_tree_read_multi ( char *  tree_ifname,
SprCwrPhoneDesc phones,
SprTreeQuestions questions,
int *  statenr 
)

read_trees() reads decision trees from the key-file tree_ifname, in which the key NTREES should be filled in. One global tree can be read (NTREES = 1, with once the line 'Global tree.' in the file). Or one tree for each context independent state can be read (each time a line 'Phone X node I' in the file).
In the latter case, the trees are put together in one single large tree. The trees are connected with context questions which ask for the phone as mid-phone (therefore these questions must exist) and with node questions which ask for the correct node. Also in case of separate trees for each phone state, the structure phones is needed for checking.
With the questions, the question name is converted to its number. statenr is a incrementing counter for the leaves, it is filled in in the tree structure when a leaf is encountered.
The read or constructed single tree is returned, or NULL on error.

void spr_tree_prune ( SprTreeTreeNode treenode,
float  max_overlap,
int *  statenr 
)

prune_tree() removes questions (and further subtrees) from the read tree which have a larger overlap than the maximal overlap (known with a programme option). The state numbers for the nodes are corrected.

Variable Documentation

const SprOptDesc spr_ct_to_prob_od[]

Description of all program arguments related to model reestimation.

const SprCmdOptDesc spr_cwr_od_beam_info[]
const SprCwrCountTree spr_cwr_empty_count_tree
const SprCwrErr spr_cwr_empty_cwr_err
const char* const spr_cwr_err_str[]
double(* spr_cwr_err_nist_werr)(const void *info, int ndx_ref, int ndx_cmp)

Alignment cost function according to the NIST standard, i.e. a substitution, insertion and deletion all cost 1.0.

double(* spr_cwr_err_dist_mat)(const void *info, int ndx_ref, int ndx_cmp)

Alignment cost function based on (phonetic) features.

const SprCmdOptDesc spr_cwr_od_err_chr_diff[]
const SprCwrFSTC spr_cwr_empty_fst_c
const char* const spr_cwr_special_node_str[SPR_CWR_NR_SPECIAL_NODES+1]
const char* const spr_cwr_special_node_str_short[SPR_CWR_NR_SPECIAL_NODES]
const char* const spr_cwr_phone_type_str[]
const SprOptDesc spr_lex_load_opt_od[]

Description of all program arguments related to lexicon loading and handling. Use this variant for programs that can work both with and without dictionary.

const SprOptDesc spr_lex_load_req_od[]

Description of all program arguments related to lexicon loading and handling.

const SprCmdOptDesc spr_cwr_od_lex_unwind[]
SprCwrLexDesc const spr_cwr_empty_lex_desc
const SprCmdOptDesc spr_cwr_od_lm_query[]
const SprCwrPhoneDesc spr_cwr_empty_phone_desc
const char* const spr_cwr_str_store_nodes[]
const SprCwrSearchCToken spr_cwr_empty_search_ctoken
const SprCwrSearchWordHist spr_cwr_empty_search_word_hist
const SprCmdOptDesc spr_cwr_od_wlat_opts[]
const SprCwrSearchWlat spr_cwr_empty_search_wlat
const char* const spr_cwr_load_flags_str[]
const char* const spr_cwr_special_word_str[SPR_CWR_NR_SPECIAL_LM_CLASSES+1]

see also get_word_id()

const SprCwrSLex spr_cwr_empty_slex
const SprCwrWordSeq spr_cwr_empty_word_seq
const SprCwrSRMDesc spr_cwr_srm_desc_am_dft
const char* const spr_hmm_str_fgmo[]
const SprHmmFGset spr_hmm_empty_fgset
const char* spr_check_hmm_keys[]

required keys in an HMM-file and their correct values

const char* spr_check_mvg_keys[]

required keys in an MVG-file and their correct values

const char* spr_check_sel_keys[]

required keys in an SEL-file and their correct values

const SprCmdOptDesc spr_cwr_od_am_std[]
const SprCwrSRMDesc spr_cwr_srm_desc_am_std
const char* const str_mdf_method[]
const char* const str_mdt_mask[]
const SprCmdOptDesc spr_cwr_od_am_mdt[]
const SprCwrSRMDesc spr_cwr_srm_desc_am_mdt
const SprTreeTreeNode spr_tree_empty_treenode