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

Back to archive index

sumom****@users***** sumom****@users*****
2012年 3月 5日 (月) 12:50:05 JST


Index: julius4/libsent/src/ngram/ngram_read_bin.c
diff -u julius4/libsent/src/ngram/ngram_read_bin.c:1.8 julius4/libsent/src/ngram/ngram_read_bin.c:1.9
--- julius4/libsent/src/ngram/ngram_read_bin.c:1.8	Fri Apr 29 14:09:17 2011
+++ julius4/libsent/src/ngram/ngram_read_bin.c	Mon Mar  5 12:50:05 2012
@@ -48,7 +48,7 @@
  * @author Akinobu LEE
  * @date   Wed Feb 16 17:12:08 2005
  *
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
  * 
  */
 /*
@@ -300,9 +300,17 @@
 	rdn(fp, t->bgn, sizeof(NNID), t->bgnlistlen);
       }
       t->num = (WORD_ID *)mymalloc_big(sizeof(WORD_ID), t->bgnlistlen);
+#ifdef WORDS_INT
+      rdn_wordid(fp, t->num, t->bgnlistlen, need_conv);
+#else
       rdn(fp, t->num, sizeof(WORD_ID), t->bgnlistlen);
+#endif
       t->nnid2wid = (WORD_ID *)mymalloc_big(sizeof(WORD_ID), t->totalnum);
+#ifdef WORDS_INT
+      rdn_wordid(fp, t->nnid2wid, t->totalnum, need_conv);
+#else
       rdn(fp, t->nnid2wid, sizeof(WORD_ID), t->totalnum);
+#endif
     } else {
       t->bgn_upper = NULL;
       t->bgn_lower = NULL;
@@ -342,6 +350,7 @@
   }
   rdn(fp, &i, sizeof(int), 1);
   if (i == 1) {
+    jlog("Stat: ngram_read_bin_v5: reading additional LR 2-gram\n");
     ndata->p_2 = (LOGPROB *)mymalloc_big(sizeof(LOGPROB), ndata->d[1].totalnum);
     rdn(fp, ndata->p_2, sizeof(LOGPROB), ndata->d[1].totalnum);
   } else {
@@ -606,6 +615,8 @@
 
   /* check initial header */
   if (check_header(fp) == FALSE) return FALSE;
+
+  jlog("Stat: ngram_read_bin: file version: %d\n", file_version);
   
 #ifdef WORDS_INT
   /* in retry mode, force word_id conversion  */



Julius-cvs メーリングリストの案内
Back to archive index