[Julius-cvs 214] CVS update: julius4/libjulius/src

アーカイブの一覧に戻る

sumom****@users***** sumom****@users*****
2008年 8月 5日 (火) 18:47:56 JST


Index: julius4/libjulius/src/m_fusion.c
diff -u julius4/libjulius/src/m_fusion.c:1.8 julius4/libjulius/src/m_fusion.c:1.9
--- julius4/libjulius/src/m_fusion.c:1.8	Thu Jul 24 18:18:09 2008
+++ julius4/libjulius/src/m_fusion.c	Tue Aug  5 18:47:56 2008
@@ -20,7 +20,7 @@
  * @author Akinobu Lee
  * @date   Thu May 12 13:31:47 2005
  *
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
  * 
  */
 /*
@@ -1100,17 +1100,15 @@
     /* set beam width */
     /* guess beam width from models, when not specified */
     p->trellis_beam_width = set_beam_width(p->wchmm, p->config->pass1.specified_trellis_beam_width);
+
+    /* initialize cache for factoring */
+    max_successor_cache_init(p->wchmm);
   }
 
   /* backtrellis initialization */
   p->backtrellis = (BACKTRELLIS *)mymalloc(sizeof(BACKTRELLIS));
   bt_init(p->backtrellis);
 
-  /* initialize cache for factoring */
-  if (p->lmtype == LM_PROB) {
-    max_successor_cache_init(p->wchmm);
-  }
-
   jlog("STAT: SR%02d %s composed\n", sconf->id, sconf->name);
 
   if (sconf->sw.start_inactive) {
@@ -1120,6 +1118,13 @@
     /* book activation for the recognition */
     p->active = 1;
   }
+  if (p->lmtype == LM_DFA) {
+    if (p->lm->winfo == NULL ||
+	(p->lmvar == LM_DFA_GRAMMAR && p->lm->dfa == NULL)) {
+      /* make this instance inactive */
+      p->active = -1;
+    }
+  }
 
   return TRUE;
 }
Index: julius4/libjulius/src/m_info.c
diff -u julius4/libjulius/src/m_info.c:1.7 julius4/libjulius/src/m_info.c:1.8
--- julius4/libjulius/src/m_info.c:1.7	Tue Jul  1 13:29:45 2008
+++ julius4/libjulius/src/m_info.c	Tue Aug  5 18:47:56 2008
@@ -12,7 +12,7 @@
  * @author Akinobu Lee
  * @date   Thu May 12 14:14:01 2005
  *
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
  * 
  */
 /*
@@ -640,19 +640,21 @@
 	jlog("\t all possible words will be expanded in 2nd pass\n");
       }
     }
-    if (r->wchmm->category_tree) {
-      if (r->config->pass1.old_tree_function_flag) {
-	jlog("\t build_wchmm() used\n");
-      } else {
-	jlog("\t build_wchmm2() used\n");
-      }
+    if (r->wchmm != NULL) {
+      if (r->wchmm->category_tree) {
+	if (r->config->pass1.old_tree_function_flag) {
+	  jlog("\t build_wchmm() used\n");
+	} else {
+	  jlog("\t build_wchmm2() used\n");
+	}
 #ifdef PASS1_IWCD
 #ifdef USE_OLD_IWCD
-      jlog("\t full lcdset used\n");
+	jlog("\t full lcdset used\n");
 #else
-      jlog("\t lcdset limited by word-pair constraint\n");
+	jlog("\t lcdset limited by word-pair constraint\n");
 #endif
 #endif /* PASS1_IWCD */
+      }
     }
     if (r->config->output.progout_flag) {
       jlog("\tprogressive output on 1st pass\n");
Index: julius4/libjulius/src/m_options.c
diff -u julius4/libjulius/src/m_options.c:1.11 julius4/libjulius/src/m_options.c:1.12
--- julius4/libjulius/src/m_options.c:1.11	Fri Jul 18 07:56:21 2008
+++ julius4/libjulius/src/m_options.c	Tue Aug  5 18:47:56 2008
@@ -18,7 +18,7 @@
  * @author Akinobu Lee
  * @date   Thu May 12 18:52:07 2005
  *
- * $Revision: 1.11 $
+ * $Revision: 1.12 $
  * 
  */
 /*
@@ -692,6 +692,10 @@
       multigram_remove_gramlist(jconf->lmnow);
       FREE_MEMORY(jconf->lmnow->dfa_filename);
       FREE_MEMORY(jconf->lmnow->dictfilename);
+      if (jconf->lmnow->lmtype == LM_UNDEF) {
+	jconf->lmnow->lmtype = LM_DFA;
+	jconf->lmnow->lmvar  = LM_DFA_GRAMMAR;
+      }
       continue;
     } else if (strmatch(argv[i],"-dfa")) { /* DFA filename */
       FREE_MEMORY(jconf->lmnow->dfa_filename);
Index: julius4/libjulius/src/multi-gram.c
diff -u julius4/libjulius/src/multi-gram.c:1.4 julius4/libjulius/src/multi-gram.c:1.5
--- julius4/libjulius/src/multi-gram.c:1.4	Sun Jul 20 01:52:33 2008
+++ julius4/libjulius/src/multi-gram.c	Tue Aug  5 18:47:56 2008
@@ -47,7 +47,7 @@
  * @author Akinobu Lee
  * @date   Sat Jun 18 23:45:18 2005
  *
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
  * 
  */
 /*
@@ -178,10 +178,10 @@
       jlog("ERROR: multi-gram: failed to re-build tree lexicon\n");
       return FALSE;
     }
-  }
 #ifdef MDEBUG
-  jlog("STAT: wchmm (re)build completed\n");
+    jlog("STAT: wchmm (re)build completed\n");
 #endif
+  }
   return(TRUE);
 }
 


Julius-cvs メーリングリストの案内
アーカイブの一覧に戻る