You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@joshua.apache.org by mj...@apache.org on 2017/03/03 00:03:33 UTC

incubator-joshua git commit: cleanup, now adds lp.conf file

Repository: incubator-joshua
Updated Branches:
  refs/heads/master 47e0d6cf6 -> d49988e54


cleanup, now adds lp.conf file


Project: http://git-wip-us.apache.org/repos/asf/incubator-joshua/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-joshua/commit/d49988e5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-joshua/tree/d49988e5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-joshua/diff/d49988e5

Branch: refs/heads/master
Commit: d49988e541f16303755d37702337a2b33755f1ed
Parents: 47e0d6c
Author: Matt Post <po...@cs.jhu.edu>
Authored: Thu Mar 2 19:03:21 2017 -0500
Committer: Matt Post <po...@cs.jhu.edu>
Committed: Thu Mar 2 19:03:21 2017 -0500

----------------------------------------------------------------------
 scripts/language-pack/build_lp.sh   | 12 ++++++------
 scripts/language-pack/copy_model.py | 11 ++---------
 2 files changed, 8 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-joshua/blob/d49988e5/scripts/language-pack/build_lp.sh
----------------------------------------------------------------------
diff --git a/scripts/language-pack/build_lp.sh b/scripts/language-pack/build_lp.sh
index 15cdb3c..6e40127 100755
--- a/scripts/language-pack/build_lp.sh
+++ b/scripts/language-pack/build_lp.sh
@@ -53,7 +53,7 @@ target=$($ISO $target_abbr)
 # Create the jar file if it's not there
 JARFILE=$(ls -tr $JOSHUA/target/joshua-*-jar-with-dependencies.jar | tail -n1)
 if [[ ! -e "$JARFILE" ]]; then
-    (cd $JOSHUA && mvn clean install)
+    (cd $JOSHUA && mvn clean package)
 fi
 
 # Create the bundle
@@ -82,11 +82,11 @@ copy_template() {
 [[ ! -d "$dest/target" ]] && mkdir -p "$dest/target"
 cp $JARFILE $dest/target
 
-# Copy over KenLM if found
-if [[ -e "$JOSHUA/lib/libken.so" ]]; then
-    [[ ! -d "$dest/lib" ]] && mkdir -p "$dest/lib"
-    cp $JOSHUA/lib/libken.so "$dest/lib"
-fi
+# create the LP config file
+version=3
+git=$(cd $JOSHUA; git describe --long --dirty)
+echo "version = $version" > $dest/lp.conf
+echo "commit = $git" >> $dest/lp.conf
 
 # Copy over the web demonstration
 cp -a $JOSHUA/demo $dest/web

http://git-wip-us.apache.org/repos/asf/incubator-joshua/blob/d49988e5/scripts/language-pack/copy_model.py
----------------------------------------------------------------------
diff --git a/scripts/language-pack/copy_model.py b/scripts/language-pack/copy_model.py
index 4b902b5..e8dd515 100755
--- a/scripts/language-pack/copy_model.py
+++ b/scripts/language-pack/copy_model.py
@@ -82,10 +82,7 @@ def bundle_runner_text(mem):
 #
 # The default amount of memory is 4gb.
 
-NUM_ARGS=0
-E_OPTERROR=1
-
-## memory usage; default is 4 GB
+## Java heap space. Increase this if you get errors.
 mem=%s
 
 if [[ $1 == "-m" ]]; then
@@ -98,11 +95,7 @@ set -u
 
 bundledir=$(dirname $0)
 
-exec java -mx${mem} \\
-    -Dfile.encoding=utf8 \\
-    -Djava.library.path=$bundledir/lib \\
-    -cp $bundledir/target/joshua-*-jar-with-dependencies.jar \\
-    org.apache.joshua.decoder.JoshuaDecoder -c $bundledir/joshua.config -v 0 "$@"
+exec java -mx${mem} -Dfile.encoding=utf8 -cp $bundledir/target/joshua-*-jar-with-dependencies.jar org.apache.joshua.decoder.JoshuaDecoder -c $bundledir/joshua.config -v 0 "$@"
 """ % mem
 
     return text