You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@joshua.apache.org by le...@apache.org on 2016/11/09 23:51:08 UTC
incubator-joshua git commit: JOSHUA-322 extract-1best script
references non-existent execution paths
Repository: incubator-joshua
Updated Branches:
refs/heads/master 2f3e75296 -> bc50c94eb
JOSHUA-322 extract-1best script references non-existent execution paths
Project: http://git-wip-us.apache.org/repos/asf/incubator-joshua/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-joshua/commit/bc50c94e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-joshua/tree/bc50c94e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-joshua/diff/bc50c94e
Branch: refs/heads/master
Commit: bc50c94ebf657314e09d880ae0bb297bf9e205fc
Parents: 2f3e752
Author: Lewis John McGibbney <le...@gmail.com>
Authored: Wed Nov 9 15:50:02 2016 -0800
Committer: Lewis John McGibbney <le...@gmail.com>
Committed: Wed Nov 9 15:50:02 2016 -0800
----------------------------------------------------------------------
bin/extract-1best | 23 +++++++++++++++++++++--
1 file changed, 21 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-joshua/blob/bc50c94e/bin/extract-1best
----------------------------------------------------------------------
diff --git a/bin/extract-1best b/bin/extract-1best
index 386d723..425ce5a 100755
--- a/bin/extract-1best
+++ b/bin/extract-1best
@@ -15,5 +15,24 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-JOSHUA=$(dirname $0)/..
-java -Xmx500m -cp $JOSHUA/class -Dfile.encoding=utf8 joshua.util.ExtractTopCand $1 - $2
+## memory usage; default is 10 GB
+mem=10g
+
+if [[ $1 == "-m" ]]; then
+ mem=$2
+ shift
+ shift
+fi
+
+set -u
+
+#JOSHUA=$(dirname $0)/..
+JOSHUA=/usr/local/Cellar/joshua/HEAD-2f3e752/libexec
+RES_OVERRIDE_PATH=$JOSHUA/src/main/resources
+# Get the jar file (only the most recent, if there are many)
+JAR_PATH=$(ls -t $JOSHUA/target/joshua-*-jar-with-dependencies.jar | head -n1)
+exec java -mx${mem} \
+ -Dfile.encoding=utf8 \
+ -Djava.library.path=$JOSHUA/lib \
+ -cp $JAR_PATH \
+ org.apache.joshua.util.ExtractTopCand