#include <sent/stddefs.h>
#include <sent/vocabulary.h>
#include <sent/htk_hmm.h>
Include dependency graph for dfa.h:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Defines | |
#define | DFA_STATESTEP 1000 |
Allocation step of DFA state. | |
#define | INITIAL_S 0x10000000 |
Status flag mask specifying an initial state. | |
#define | ACCEPT_S 0x00000001 |
Status flag mask specifying an accept state. | |
Typedefs | |
typedef _dfa_arc | DFA_ARC |
Transition arc of DFA. | |
Functions | |
DFA_INFO * | dfa_info_new () |
void | dfa_info_free (DFA_INFO *dfa) |
void | dfa_state_init (DFA_INFO *dinfo) |
void | dfa_state_expand (DFA_INFO *dinfo, int needed) |
boolean | rddfa (FILE *fp, DFA_INFO *dinfo) |
boolean | rddfa_fd (int fd, DFA_INFO *dinfo) |
boolean | rddfa_sd (int sd, DFA_INFO *dinfo) |
boolean | rddfa_line (char *line, DFA_INFO *dinfo, int *state_max, int *arc_num, int *terminal_max) |
void | dfa_append (DFA_INFO *dst, DFA_INFO *src, int soffset, int coffset) |
void | init_dfa (DFA_INFO *dinfo, char *filename) |
WORD_ID | dfa_symbol_lookup (DFA_INFO *dinfo, char *terminalname) |
void | extract_cpair (DFA_INFO *dinfo) |
void | cpair_append (DFA_INFO *dst, DFA_INFO *src, int coffset) |
void | print_dfa_info (DFA_INFO *dinfo) |
void | print_dfa_cp (DFA_INFO *dinfo) |
boolean | dfa_cp (DFA_INFO *dfa, int i, int j) |
boolean | dfa_cp_begin (DFA_INFO *dfa, int i) |
boolean | dfa_cp_end (DFA_INFO *dfa, int i) |
void | set_dfa_cp (DFA_INFO *dfa, int i, int j, boolean value) |
void | set_dfa_cp_begin (DFA_INFO *dfa, int i, boolean value) |
void | set_dfa_cp_end (DFA_INFO *dfa, int i, boolean value) |
void | init_dfa_cp (DFA_INFO *dfa) |
void | malloc_dfa_cp (DFA_INFO *dfa, int term_num) |
void | realloc_dfa_cp (DFA_INFO *dfa, int old_term_num, int new_term_num) |
void | free_dfa_cp (DFA_INFO *dfa) |
void | make_dfa_voca_ref (DFA_INFO *dinfo, WORD_INFO *winfo) |
void | make_terminfo (TERM_INFO *tinfo, DFA_INFO *dinfo, WORD_INFO *winfo) |
void | terminfo_append (TERM_INFO *dst, TERM_INFO *src, int coffset, int woffset) |
void | dfa_find_pause_word (DFA_INFO *dfa, WORD_INFO *winfo, HTK_HMM_INFO *hmminfo) |
void | dfa_pause_word_append (DFA_INFO *dst, DFA_INFO *src, int coffset) |
DFA is a deterministic finite state automaton describing grammartical constraint, using the category number of each dictionary word as an input. It also holds lists of words belonging for each categories.
Additionaly, the category-pair information will be generated from the given DFA by extracting allowed connections between categories. It will be used as a degenerated constraint of word connection at the 1st pass.
Definition in file dfa.h.
|
Allocate a new grammar information data structure and initialize it.
Definition at line 33 of file dfa_malloc.c. Referenced by multigram_exec(), and multigram_read_file(). |
|
Free all informations in the DFA_INFO.
Definition at line 54 of file dfa_malloc.c. Referenced by multigram_exec(), and multigram_exec_delete(). |
|
Initialize and allocate DFA state information list in the grammar.
Definition at line 35 of file rddfa.c. Referenced by multigram_exec(), rddfa(), rddfa_fd(), and rddfa_sd(). |
|
Expand the state information list to the required length.
Definition at line 56 of file rddfa.c. Referenced by dfa_append(), and rddfa_line(). |
|
Top loop function to read DFA grammar via file pointer
Definition at line 79 of file rddfa.c. Referenced by init_dfa(). |
|
Top loop function to read DFA grammar via file descriptor
|
|
Top loop function to read DFA grammar via socket descriptor
|
|
Parse the input line and set grammar information, one by line.
Definition at line 172 of file rddfa.c. Referenced by rddfa(), rddfa_fd(), and rddfa_sd(). |
|
Append the DFA state information to other
Definition at line 230 of file rddfa.c. Referenced by multigram_build_append(). |
|
Read in a grammar file and set to DFA grammar structure
Definition at line 45 of file init_dfa.c. Referenced by multigram_read_file(). |
|
Return category id corresponding to the given terminal name. Actually they are mere strings of ID itself.
Definition at line 44 of file dfa_lookup.c. Referenced by make_dfa_voca_ref(). |
|
Extract category-pair constraint from DFA grammar and newly set the category pair matrix of the give DFA.
Definition at line 60 of file mkcpair.c. Referenced by multigram_exec(). |
|
Append the category pair matrix at the last.
Definition at line 113 of file mkcpair.c. Referenced by multigram_build_append(). |
|
Output overall grammar information to stdout.
Definition at line 33 of file dfa_util.c. Referenced by print_info(). |
|
Output the category-pair matrix in text format to stdout
Definition at line 48 of file dfa_util.c. Referenced by print_info(). |
|
Return whether the given two category can be connected or not.
Definition at line 48 of file cpair.c. Referenced by cpair_append(), get_back_trellis_proceed(), lcdset_register_with_category(), lcdset_register_with_category_all(), and print_dfa_cp(). |
|
Return whether the category can be appear at the beginning of sentence.
Definition at line 63 of file cpair.c. Referenced by cpair_append(), init_nodescore(), and print_dfa_cp(). |
|
Return whether the category can be appear at the end of sentence.
Definition at line 78 of file cpair.c. Referenced by cpair_append(), and print_dfa_cp(). |
|
Set the category-pair matrix bit
Definition at line 93 of file cpair.c. Referenced by cpair_append(), extract_cpair(), malloc_dfa_cp(), and realloc_dfa_cp(). |
|
Set the category-pair matrix bit at the beginning of sentence
Definition at line 112 of file cpair.c. Referenced by cpair_append(), extract_cpair(), malloc_dfa_cp(), and realloc_dfa_cp(). |
|
Set the category-pair matrix bit at the end of sentence
Definition at line 131 of file cpair.c. Referenced by cpair_append(), extract_cpair(), malloc_dfa_cp(), and realloc_dfa_cp(). |
|
Initialize category pair matrix in the grammar data.
Definition at line 147 of file cpair.c. Referenced by dfa_info_new(). |
|
Allocate memory for category pair matrix and initialize it.
Definition at line 162 of file cpair.c. Referenced by extract_cpair(), and realloc_dfa_cp(). |
|
Re-allocate memory for category pair matrix, can be called when the number of category is expanded.
Definition at line 193 of file cpair.c. Referenced by cpair_append(). |
|
Free the category pair matrix from DFA grammar.
Definition at line 254 of file cpair.c. Referenced by dfa_info_free(). |
|
Make correspondence between all words in dictionary and categories in grammar, both from a word to a category and from a category to words.
Definition at line 71 of file init_dfa.c. Referenced by multigram_exec(). |
|
Make a word list for each category.
Definition at line 38 of file mkterminfo.c. Referenced by make_dfa_voca_ref(). |
|
Append the terminal(category) word list.
Definition at line 76 of file mkterminfo.c. Referenced by multigram_build_append(). |
|
Find pause word and pause category information, and set to the grammar data.
Definition at line 104 of file init_dfa.c. Referenced by multigram_exec(). |
|
Append the pause word/category information at the last.
Definition at line 135 of file init_dfa.c. Referenced by multigram_build_append(). |