#include <julius.h>
Include dependency graph for multi-gram.h:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Defines | |
#define | MAXGRAMNAMELEN 512 |
Maximum length of grammar name. | |
#define | MULTIGRAM_DEFAULT 0 |
Grammar hook value of no operation. | |
#define | MULTIGRAM_DELETE 1 |
Grammar hook value specifying that this grammar is to be deleted. | |
#define | MULTIGRAM_ACTIVATE 2 |
Grammar hook value specifying that this grammar is to be activated. | |
#define | MULTIGRAM_DEACTIVATE 3 |
Grammar hook value specifying that this grammar is to be deactivated. | |
Typedefs | |
typedef __multi_gram__ | MULTIGRAM |
Grammar holder. | |
typedef __gram_list__ | GRAMLIST |
List of grammars to be read at startup. | |
Functions | |
void | multigram_add (DFA_INFO *dfa, WORD_INFO *winfo, char *name) |
boolean | multigram_delete (int gid) |
void | multigram_delete_all () |
boolean | multigram_exec () |
Update and re-construct global grammar if needed. | |
void | multigram_activate (int gid) |
void | multigram_deactivate (int gid) |
void | multigram_read_file (char *dfa_file, char *dict_file) |
void | multigram_add_gramlist (char *dfafile, char *dictfile) |
void | multigram_remove_gramlist () |
void | multigram_read_all_gramlist () |
void | multigram_add_prefix_list (char *prefix_list, char *cwd) |
Add multiple grammars given by their prefixs to the grammar list. | |
void | multigram_add_prefix_filelist (char *listfile) |
Add multiple grammars from prefix list file to the grammar list. | |
int | multigram_get_active_num () |
int | multigram_get_gram_from_category (int category) |
Definition in file multi-gram.h.
|
Add a new grammar to the current list of grammars.
Definition at line 291 of file multi-gram.c. Referenced by multigram_read_file(). |
|
Mark a grammar in the grammar list to be deleted at the next grammar update.
Definition at line 342 of file multi-gram.c. |
|
Mark all grammars in the grammar list to be deleted at the next grammar update. Definition at line 372 of file multi-gram.c. |
|
Update and re-construct global grammar if needed. This function checks for any modification in the grammar list from previous call, and update the global grammar if needed. If there are grammars marked to be deleted in the grammar list, they will be actually deleted from memory. Then the global grammar is built from scratch using the rest grammars. If there are new grammars, they are appended to the current global grammar. If any modification of the global grammar occured in the process above, the tree lexicons and some other data for recognition will be re-constructed from the updated global grammar.
Definition at line 587 of file multi-gram.c. Referenced by final_fusion(), and main_recognition_loop(). |
|
Activate specified grammar in the grammar list. The specified grammar will only be marked as to be activated in the next grammar update timing.
Definition at line 444 of file multi-gram.c. |
|
Deactivate a grammar in the grammar list. The words of the de-activated grammar will not be expanded in the recognition process. This feature enables rapid switching of grammars without re-building tree lexicon. The de-activated grammar will again be activated by calling multigram_activate().
Definition at line 490 of file multi-gram.c. |
|
Read in dfa file and dict file, and add them to the grammar list.
Definition at line 689 of file multi-gram.c. Referenced by multigram_read_all_gramlist(). |
|
Add a grammar to the grammar list to be read at startup.
Definition at line 756 of file multi-gram.c. Referenced by final_fusion(), multigram_add_prefix_filelist(), and multigram_add_prefix_list(). |
|
Remove the grammar list to be read at startup. Definition at line 778 of file multi-gram.c. Referenced by opt_parse(). |
|
Read in all the grammars specified at startup. Definition at line 805 of file multi-gram.c. Referenced by final_fusion(). |
|
Add multiple grammars given by their prefixs to the grammar list. This function read in several grammars, given a prefix string that contains a list of file prefixes separated by comma: "foo" or "foo,bar". For each prefix, string ".dfa" and ".dict" will be appended to read dfa file and dict file. The read grammars will be added to the grammar list.
Definition at line 840 of file multi-gram.c. Referenced by opt_parse(). |
|
Add multiple grammars from prefix list file to the grammar list. This function read in multiple grammars at once, given a file that contains a list of grammar prefixes, each per line. For each prefix, string ".dfa" and ".dict" will be appended to read the corresponding dfa and dict file. The read grammars will be added to the grammar list.
Definition at line 902 of file multi-gram.c. Referenced by opt_parse(). |
|
Get which grammar the given category belongs to.
Definition at line 999 of file multi-gram.c. Referenced by msock_pass2(), and ttyout_pass2(). |