julius/multi-gram.h

Go to the documentation of this file.
00001 
00017 /*
00018  * Copyright (c) 1991-2006 Kawahara Lab., Kyoto University
00019  * Copyright (c) 2000-2005 Shikano Lab., Nara Institute of Science and Technology
00020  * Copyright (c) 2005-2006 Julius project team, Nagoya Institute of Technology
00021  * All rights reserved
00022  */
00023 
00024 #ifndef __MULTI_GRAM__
00025 #define __MULTI_GRAM__
00026 
00027 #include <julius.h>
00028 
00029 #ifdef USE_DFA
00030 
00032 #define MAXGRAMNAMELEN 512
00033 
00035 typedef struct __multi_gram__ {
00036   char name[MAXGRAMNAMELEN];    
00037   unsigned short id;            
00038   DFA_INFO *dfa;                
00039   WORD_INFO *winfo;             
00040   int hook;                     
00041   boolean newbie;               
00042   boolean active;               
00043 
00044   int state_begin;              
00045   int cate_begin;               
00046   int word_begin;               
00047   struct __multi_gram__ *next;  
00048 } MULTIGRAM;
00049 
00051 typedef struct __gram_list__ {
00052   char *dfafile;                
00053   char *dictfile;               
00054   struct __gram_list__ *next;   
00055 } GRAMLIST;
00056 
00057 /* for command hook */
00058 #define MULTIGRAM_DEFAULT    0  
00059 #define MULTIGRAM_DELETE     1  
00060 #define MULTIGRAM_ACTIVATE   2  
00061 #define MULTIGRAM_DEACTIVATE 3  
00062 
00063 void multigram_add(DFA_INFO *dfa, WORD_INFO *winfo, char *name);
00064 boolean multigram_delete(int gid);
00065 void multigram_delete_all();
00066 boolean multigram_exec();
00067 void multigram_activate(int gid);
00068 void multigram_deactivate(int gid);
00069 
00070 void multigram_read_file(char *dfa_file, char *dict_file);
00071 void multigram_add_gramlist(char *dfafile, char *dictfile);
00072 void multigram_remove_gramlist();
00073 void multigram_read_all_gramlist();
00074 void multigram_add_prefix_list(char *prefix_list, char *cwd);
00075 void multigram_add_prefix_filelist(char *listfile);
00076 int multigram_get_active_num();
00077 int multigram_get_gram_from_category(int category);
00078 
00079 #endif /* USE_DFA */
00080 
00081 #endif /*  __MULTI_GRAM__ */

Generated on Tue Dec 26 16:16:33 2006 for Julius by  doxygen 1.5.0