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

Reading and conversion of phone descriptions + assimilation rules. More...

Data Structures

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
 

Enumerations

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 }
 

Functions

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)
 

Variables

const SprCwrPhoneDesc spr_cwr_empty_phone_desc
 

Detailed Description

Reading and conversion of phone descriptions + assimilation rules.

Note on special symbols:
The phone description file as read by read_phone_desc() does not only need to define all possible phones in the phonetic alphabet, it also needs to define some extra symbols. The following special symbols are needed by the recognition system:
WORD_SEP
Symbol used to seperate words. Can be used in assimilation rules and descriptions of CD-phones as a context (note: the 'WORD_SEP' symbol cannot be intermingled with normal phones in a set and can thus only occur in the form '[' WORD_SEP ']'). WORD_SEP is also used when a sentence (sequence of words) is converted to a phone string (routines read_lex_desc() and lex_sentence2trellis() in the module cwr_lex). The default value is '|'.
WORD_EXT
When checking a context (assimilation rules or CD-phones), only one word boundary can traversed. All symbols after a second word boundary are replaced by this symbol. Note: by specifying some extra flags one can prevent the system from crossing any word boundary. In that case, the 'WORD_EXT' symbol will be used from the first word boundary encountered. By default the same symbol is used as for 'WORD_SEP'.
SIL_STR
The silence symbol. The silence symbol is used as context before and after a sentence by default, and if requested, it is placed in-between words for recognition of forced alignment. The default value is '#' or 'xx' if '#' is not part of the phone set. If neither '#' nor 'xx' are part of the phone set, '#' is used, but this mode of operation is unsafe and may result in errors.

The default strings for the special symbols can be overwritten by defining them in the key-header of the CI-phone description file (see read_phone_desc() for more details).

Date
Oct 1995
Author
Kris Demuynck
Revision History:
June 1996 - KD
Added routines for assimilation rules.