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 2016/11/22 16:02:04 UTC

[1/3] incubator-joshua git commit: bugfix in copy-config invocation

Repository: incubator-joshua
Updated Branches:
  refs/heads/master 9789a3692 -> bea6161f4


bugfix in copy-config invocation


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

Branch: refs/heads/master
Commit: a57fe4ba1d39ff68a458c3fa32f033fcc04d0011
Parents: 9789a36
Author: Matt Post <po...@cs.jhu.edu>
Authored: Tue Nov 22 11:01:08 2016 -0500
Committer: Matt Post <po...@cs.jhu.edu>
Committed: Tue Nov 22 11:01:08 2016 -0500

----------------------------------------------------------------------
 scripts/language-pack/build_lp.sh | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-joshua/blob/a57fe4ba/scripts/language-pack/build_lp.sh
----------------------------------------------------------------------
diff --git a/scripts/language-pack/build_lp.sh b/scripts/language-pack/build_lp.sh
index 8242077..c6e59a2 100755
--- a/scripts/language-pack/build_lp.sh
+++ b/scripts/language-pack/build_lp.sh
@@ -50,8 +50,11 @@ target_abbr=$(echo $langpair | cut -d- -f2)
 source=$($ISO $source_abbr)
 target=$($ISO $target_abbr)
 
-# Create the jar file
-(cd $JOSHUA && mvn clean compile assembly:single)
+# 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)
+fi
 
 # Create the bundle
 # ... --copy-config-options "-lower-case true -project-case true"
@@ -60,7 +63,7 @@ $JOSHUA/scripts/language-pack/copy_model.py \
     --verbose \
     --mem $mem \
     --copy-config-options \
-      '-top-n 1 -output-format %S -mark-oovs false -lower-case -project-case' \
+      '-top-n 1 -output-format %S -mark-oovs false -lower-case true -project-case true' \
     $config \
     $dest
 
@@ -79,7 +82,7 @@ copy_template() {
 [[ ! -d "$dest/target" ]] && mkdir -p "$dest/target"
 
 # Copy over critical infrastructure files
-cp $JOSHUA/target/joshua-*-jar-with-dependencies.jar $dest/target
+cp $JARFILE $dest/target
 
 # Copy over the example files
 for ext in $source_abbr $target_abbr; do


[3/3] incubator-joshua git commit: small change in build

Posted by mj...@apache.org.
small change in build


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

Branch: refs/heads/master
Commit: bea6161f482ea424417964b1b04fbcf51995a59e
Parents: 6c6f2fa
Author: Matt Post <po...@cs.jhu.edu>
Authored: Tue Nov 22 11:01:53 2016 -0500
Committer: Matt Post <po...@cs.jhu.edu>
Committed: Tue Nov 22 11:01:53 2016 -0500

----------------------------------------------------------------------
 jni/build_kenlm.sh | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-joshua/blob/bea6161f/jni/build_kenlm.sh
----------------------------------------------------------------------
diff --git a/jni/build_kenlm.sh b/jni/build_kenlm.sh
index 1461181..24f2e62 100755
--- a/jni/build_kenlm.sh
+++ b/jni/build_kenlm.sh
@@ -17,8 +17,7 @@
 #
 set -u
 
-KENLM_MAX_ORDER=10
-
+export KENLM_MAX_ORDER=10
 export CXX=${CXX:-g++}
 export LDFLAGS+=" -lz -lbz2 -llzma"
 #CXXFLAGS+=" -O3 -fPIC -DHAVE_ZLIB"
@@ -32,7 +31,7 @@ cd $JOSHUA/ext/kenlm
 cd build
 cmake .. -DKENLM_MAX_ORDER=$KENLM_MAX_ORDER
 #Use this if cmake fails with boost errors
-#cmake .. -DBoost_NO_BOOST_CMAKE=TRUE -DBOOST_ROOT=/opt/boost
+#cmake .. -DBoost_NO_BOOST_CMAKE=TRUE -DBOOST_ROOT=/opt/boost -DKENLM_MAX_ORDER=$KENLM_MAX_ORDER
 make -j
 cp bin/{query,lmplz,build_binary} $JOSHUA/bin
 


[2/3] incubator-joshua git commit: added note about web demo to README

Posted by mj...@apache.org.
added note about web demo to README


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

Branch: refs/heads/master
Commit: 6c6f2fa2128857fddbfea184e0c70e643f993d27
Parents: a57fe4b
Author: Matt Post <po...@cs.jhu.edu>
Authored: Tue Nov 22 11:01:22 2016 -0500
Committer: Matt Post <po...@cs.jhu.edu>
Committed: Tue Nov 22 11:01:22 2016 -0500

----------------------------------------------------------------------
 scripts/language-pack/README.template | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-joshua/blob/6c6f2fa2/scripts/language-pack/README.template
----------------------------------------------------------------------
diff --git a/scripts/language-pack/README.template b/scripts/language-pack/README.template
index 9fd9421..d05b2e1 100644
--- a/scripts/language-pack/README.template
+++ b/scripts/language-pack/README.template
@@ -57,6 +57,28 @@ You can set the RESTful interface by also passing '-server-type http':
 The RESTful interface is used when running the browser demo (see web/index.html)
 or when using the Joshua Translation Engine.
 
+Web demo
+--------
+See the web/ directory for a web-based AJAX interface to Java. One feature of this
+approach is that it permits you to add custom words and phrases to Joshua, which then
+become translation options for the decoder. To start the web demo,
+
+1. Start Joshua in HTTP server mode, as described above
+
+       ./joshua -server-port 5674 -server-type http
+
+   This starts Joshua running on port 5674.
+
+2. Load the web interface, passing it to server and port you are using
+
+       firefox "web/index.html?server=localhost&port=5674"
+
+   Any browser will do.
+
+You can then translate text, entering one sentence per line, in the main box. You can
+also experiment with adding words and phrases. These are then saved to a custom grammar.
+These rules can be managed on the "Rules" tab.
+
 Runtime options
 ---------------
 By default, the language pack runs with a single thread and with options set to