[Julius-cvs 611] CVS update: julius4/libsent/src/ngram

アーカイブの一覧に戻る

sumom****@users***** sumom****@users*****
2011年 2月 13日 (日) 19:45:56 JST


Index: julius4/libsent/src/ngram/ngram_lookup.c
diff -u julius4/libsent/src/ngram/ngram_lookup.c:1.3 julius4/libsent/src/ngram/ngram_lookup.c:1.4
--- julius4/libsent/src/ngram/ngram_lookup.c:1.3	Tue Feb 10 02:27:46 2009
+++ julius4/libsent/src/ngram/ngram_lookup.c	Sun Feb 13 19:45:56 2011
@@ -12,7 +12,7 @@
  * @author Akinobu LEE
  * @date   Wed Feb 16 16:42:38 2005
  *
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
  * 
  */
 /*
@@ -47,7 +47,7 @@
     wnameindex[i] = ndata->wname[i];
   }
 
-  ndata->root = make_ptree(wnameindex, windex, ndata->max_word_num, 0);
+  ndata->root = make_ptree(wnameindex, windex, ndata->max_word_num, 0, &(ndata->mroot));
 
   free(windex);
   free(wnameindex);
Index: julius4/libsent/src/ngram/ngram_malloc.c
diff -u julius4/libsent/src/ngram/ngram_malloc.c:1.4 julius4/libsent/src/ngram/ngram_malloc.c:1.5
--- julius4/libsent/src/ngram/ngram_malloc.c:1.4	Sat Jul  4 23:11:43 2009
+++ julius4/libsent/src/ngram/ngram_malloc.c	Sun Feb 13 19:45:56 2011
@@ -12,7 +12,7 @@
  * @author Akinobu LEE
  * @date   Wed Feb 16 16:48:56 2005
  *
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
  * 
  */
 /*
@@ -41,6 +41,7 @@
   new->bo_wt_1 = NULL;
   new->p_2 = NULL;
   new->bos_eos_swap = FALSE;
+  new->mroot = NULL;
 
   return(new);
 }
@@ -93,7 +94,7 @@
     free(ndata->d);
   }
   /* free name index tree */
-  free_ptree(ndata->root);
+  if (ndata->mroot) mybfree2(&(ndata->mroot));
   /* free whole */
   free(ndata);
 }
Index: julius4/libsent/src/ngram/ngram_read_arpa.c
diff -u julius4/libsent/src/ngram/ngram_read_arpa.c:1.16 julius4/libsent/src/ngram/ngram_read_arpa.c:1.17
--- julius4/libsent/src/ngram/ngram_read_arpa.c:1.16	Sat Jul  4 23:11:43 2009
+++ julius4/libsent/src/ngram/ngram_read_arpa.c	Sun Feb 13 19:45:56 2011
@@ -20,7 +20,7 @@
  * @author Akinobu LEE
  * @date   Wed Feb 16 16:52:24 2005
  *
- * $Revision: 1.16 $
+ * $Revision: 1.17 $
  * 
  */
 /*
@@ -30,7 +30,7 @@
  * All rights reserved
  */
 
-/* $Id: ngram_read_arpa.c,v 1.16 2009/07/04 14:11:43 sumomo Exp $ */
+/* $Id: ngram_read_arpa.c,v 1.17 2011/02/13 10:45:56 sumomo Exp $ */
 
 /* words should be alphabetically sorted */
 
@@ -152,7 +152,7 @@
 
     /* add entry name to index tree */
     if (ndata->root == NULL) {
-      ndata->root = ptree_make_root_node(nid);
+      ndata->root = ptree_make_root_node(nid, &(ndata->mroot));
     } else {
       resid = ptree_search_data(name, ndata->root);
       if (resid != -1 && strmatch(name, ndata->wname[resid])) { /* already exist */
@@ -160,7 +160,7 @@
 	ok_p = FALSE;
 	continue;
       } else {
-	ptree_add_entry(name, nid, ndata->wname[resid], &(ndata->root));
+	ptree_add_entry(name, nid, ndata->wname[resid], &(ndata->root), &(ndata->mroot));
       }
     }
 



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