[90978] trunk/dports/audio/julius
hum at macports.org
hum at macports.org
Tue Mar 20 07:56:47 PDT 2012
Revision: 90978
https://trac.macports.org/changeset/90978
Author: hum at macports.org
Date: 2012-03-20 07:56:47 -0700 (Tue, 20 Mar 2012)
Log Message:
-----------
julius: add patch-ngram_read_bin.c.diff to fix words_int extension.
Modified Paths:
--------------
trunk/dports/audio/julius/Portfile
Added Paths:
-----------
trunk/dports/audio/julius/files/patch-ngram_read_bin.c.diff
Modified: trunk/dports/audio/julius/Portfile
===================================================================
--- trunk/dports/audio/julius/Portfile 2012-03-20 14:47:34 UTC (rev 90977)
+++ trunk/dports/audio/julius/Portfile 2012-03-20 14:56:47 UTC (rev 90978)
@@ -34,12 +34,9 @@
# Note: '--enable-words-int' should be declared ahead of '--with-mictype'.
variant words_int description {Use integer for word ID to extend vocabulary limit} {
- configure.args-append --enable-words-int
- notes-append "
- An executable built with '--enable-words-int' fails to convert\
- 2-byte bingrams, and it cannot start with the dictation kit.
- If you'd like to use the dictation kit, you may replace its\
- 2-byte bingram with a 4-byte one."
+ # http://sourceforge.jp/cvs/view/julius/julius4/libsent/src/ngram/ngram_read_bin.c?r1=1.8&r2=1.9
+ patchfiles-append patch-ngram_read_bin.c.diff
+ configure.pre_args-append --enable-words-int
}
platform darwin 10 {
Added: trunk/dports/audio/julius/files/patch-ngram_read_bin.c.diff
===================================================================
--- trunk/dports/audio/julius/files/patch-ngram_read_bin.c.diff (rev 0)
+++ trunk/dports/audio/julius/files/patch-ngram_read_bin.c.diff 2012-03-20 14:56:47 UTC (rev 90978)
@@ -0,0 +1,46 @@
+--- libsent/src/ngram/ngram_read_bin.c 2011/04/29 05:09:17 1.8
++++ libsent/src/ngram/ngram_read_bin.c 2012/03/05 03:50:05 1.9
+@@ -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 */
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120320/b92b71f6/attachment.html>
More information about the macports-changes
mailing list