[117099] trunk/dports/textproc

hum at macports.org hum at macports.org
Sun Feb 16 08:30:14 PST 2014


Revision: 117099
          https://trac.macports.org/changeset/117099
Author:   hum at macports.org
Date:     2014-02-16 08:30:14 -0800 (Sun, 16 Feb 2014)
Log Message:
-----------
New port: rnnlm @0.4b - Recurrent Neural Network Language Modeling Toolkit.

Added Paths:
-----------
    trunk/dports/textproc/rnnlm/
    trunk/dports/textproc/rnnlm/Portfile
    trunk/dports/textproc/rnnlm/files/
    trunk/dports/textproc/rnnlm/files/patch-rnnlmlib.cpp.diff

Added: trunk/dports/textproc/rnnlm/Portfile
===================================================================
--- trunk/dports/textproc/rnnlm/Portfile	                        (rev 0)
+++ trunk/dports/textproc/rnnlm/Portfile	2014-02-16 16:30:14 UTC (rev 117099)
@@ -0,0 +1,53 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
+# $Id$
+
+PortSystem          1.0
+
+name                rnnlm
+version             0.4b
+categories          textproc
+maintainers         hum openmaintainer
+
+description         Recurrent Neural Network Language Modeling Toolkit
+
+long_description    Neural network based language models are nowdays among the \
+                    most successful techniques for statistical language modeling. \
+                    They can be easily applied in wide range of tasks, including \
+                    automatic speech recognition and machine translation, and \
+                    provide significant improvements over classic backoff n-gram \
+                    models.
+
+homepage            http://rnnlm.org
+platforms           darwin
+license             Permissive
+
+master_sites        https://googledrive.com/host/0ByxdPXuxLPS5RFM5dVNvWVhTd0U/
+extract.suffix      .tgz
+checksums           rmd160  09c895f331593c7fb4bcae6970e1e6c799782854 \
+                    sha256  bade7d3ca453c9edd171d72cefb8019d0c4ed365fa5c660629ff4cd08932cc23
+
+patchfiles          patch-rnnlmlib.cpp.diff
+
+use_configure       no
+variant universal   {}
+
+configure.optflags  -O2
+
+use_parallel_build  no
+build.args          CC="${configure.cxx}" \
+                    CFLAGS="${configure.cxxflags} [get_canonical_archflags cxx] -D WEIGHTTYPE=float -lm -Wall -funroll-loops -ffast-math"
+
+destroot {
+    xinstall -m 755 -W ${worksrcpath} \
+        rnnlm \
+        ${destroot}${prefix}/bin
+    set docdir ${prefix}/share/doc/${name}
+    xinstall -d ${destroot}${docdir}
+    xinstall -m 644 -W ${worksrcpath} \
+        CHANGE-Cantab.log CHANGE.log COPYRIGHT.txt FAQ.txt \
+        ${destroot}${docdir}
+}
+
+livecheck.type      regex
+livecheck.url       [lindex ${master_sites} 0]
+livecheck.regex     "${name}-(\\d+(?:\\.\\d+)*\\w*)${extract.suffix}"


Property changes on: trunk/dports/textproc/rnnlm/Portfile
___________________________________________________________________
Added: svn:keywords
   + Id
Added: svn:eol-style
   + native

Added: trunk/dports/textproc/rnnlm/files/patch-rnnlmlib.cpp.diff
===================================================================
--- trunk/dports/textproc/rnnlm/files/patch-rnnlmlib.cpp.diff	                        (rev 0)
+++ trunk/dports/textproc/rnnlm/files/patch-rnnlmlib.cpp.diff	2014-02-16 16:30:14 UTC (rev 117099)
@@ -0,0 +1,39 @@
+--- rnnlmlib.cpp.orig	2013-11-14 02:25:40.000000000 +0900
++++ rnnlmlib.cpp	2014-02-16 21:00:51.000000000 +0900
+@@ -1644,7 +1644,7 @@
+         
+         fprintf(flog, "\niter: %d\n", iter);
+         fprintf(flog, "valid log probability: %f\n", logp);
+-        fprintf(flog, "PPL net: %f\n", exp10(-logp/(real)wordcn));
++        fprintf(flog, "PPL net: %f\n", pow(10, -logp/(real)wordcn));
+         
+         fclose(flog);
+     
+@@ -1791,10 +1791,10 @@
+     	    fprintf(flog, "test log probability %f*rnn + %f*other_lm: %f\n", lambda, 1-lambda, log_combine);
+ 	}
+ 
+-	fprintf(flog, "\nPPL net: %f\n", exp10(-logp/(real)wordcn));
++	fprintf(flog, "\nPPL net: %f\n", pow(10, -logp/(real)wordcn));
+ 	if (use_lmprob) {
+-    	    fprintf(flog, "PPL other: %f\n", exp10(-log_other/(real)wordcn));
+-    	    fprintf(flog, "PPL combine: %f\n", exp10(-log_combine/(real)wordcn));
++           fprintf(flog, "PPL other: %f\n", pow(10, -log_other/(real)wordcn));
++           fprintf(flog, "PPL combine: %f\n", pow(10, -log_combine/(real)wordcn));
+ 	}
+     }
+     
+@@ -1929,10 +1929,10 @@
+     	    printf("test log probability %f*rnn + %f*other_lm: %f\n", lambda, 1-lambda, log_combine);
+ 	}
+ 
+-	printf("\nPPL net: %f\n", exp10(-logp/(real)wordcn));
++	printf("\nPPL net: %f\n", pow(10, -logp/(real)wordcn));
+ 	if (use_lmprob) {
+-    	    printf("PPL other: %f\n", exp10(-log_other/(real)wordcn));
+-    	    printf("PPL combine: %f\n", exp10(-log_combine/(real)wordcn));
++           printf("PPL other: %f\n", pow(10, -log_other/(real)wordcn));
++    	    printf("PPL combine: %f\n", pow(10, -log_combine/(real)wordcn));
+ 	}
+     }
+ 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140216/b9d6b2ce/attachment.html>


More information about the macports-changes mailing list