sumom****@users*****
sumom****@users*****
2009年 7月 29日 (水) 18:32:36 JST
Index: julius4/libjulius/src/multi-gram.c diff -u julius4/libjulius/src/multi-gram.c:1.8 julius4/libjulius/src/multi-gram.c:1.9 --- julius4/libjulius/src/multi-gram.c:1.8 Fri Nov 14 13:12:12 2008 +++ julius4/libjulius/src/multi-gram.c Wed Jul 29 18:32:36 2009 @@ -47,7 +47,7 @@ * @author Akinobu Lee * @date Sat Jun 18 23:45:18 2005 * - * $Revision: 1.8 $ + * $Revision: 1.9 $ * */ /* @@ -244,7 +244,7 @@ * <JA> * 新たな文法を,文法リストに追加する. * 現在インスタンスが保持している文法のリストは lm->grammars に保存される. - * 追加した文法には,newbie, active のフラグがセットされ,次回の + * 追加した文法には,newbie と inactive のフラグがセットされ,次回の * 文法更新チェック時に更新対象となる. * * @param dfa [in] 追加登録する文法のDFA情報 @@ -258,7 +258,7 @@ * Add a new grammar to the current list of grammars. * The list of grammars which the LM instance keeps currently is * at lm->grammars. - * The new grammar is flaged at "newbie" and "active", to be treated + * The new grammar is flagged at "newbie" and "inactive", to be treated * properly at the next grammar update check. * * @param dfa [in] DFA information of the new grammar. @@ -289,9 +289,10 @@ new->id = lm->gram_maxid; new->dfa = dfa; new->winfo = winfo; - new->hook = MULTIGRAM_DEFAULT; + /* will be setup and activated after multigram_update() is called once */ + new->hook = MULTIGRAM_DEFAULT | MULTIGRAM_ACTIVATE; new->newbie = TRUE; /* need to setup */ - new->active = TRUE; /* default: active */ + new->active = FALSE; /* default: inactive */ /* the new grammar is now added to gramlist */ new->next = lm->grammars;