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/05/31 16:55:02 UTC
[6/9] incubator-joshua git commit: fix language pack code
fix language pack code
Project: http://git-wip-us.apache.org/repos/asf/incubator-joshua/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-joshua/commit/1ec7c925
Tree: http://git-wip-us.apache.org/repos/asf/incubator-joshua/tree/1ec7c925
Diff: http://git-wip-us.apache.org/repos/asf/incubator-joshua/diff/1ec7c925
Branch: refs/heads/JOSHUA-252
Commit: 1ec7c9257d410f3ac4acc1b53270ee98b6ef2edc
Parents: e67a9e4
Author: Tom Barber <to...@analytical-labs.com>
Authored: Wed May 25 22:51:14 2016 +0200
Committer: Tom Barber <to...@analytical-labs.com>
Committed: Wed May 25 22:51:14 2016 +0200
----------------------------------------------------------------------
distribution/joshua-full/README.md | 2 +-
distribution/joshua-full/actions/add-language-pack | 13 ++++++++++---
distribution/joshua-full/metadata.yaml | 9 +--------
distribution/joshua-runtime/README.md | 2 +-
distribution/joshua-runtime/actions/add-language-pack | 11 +++++++++--
distribution/joshua-runtime/metadata.yaml | 7 +------
6 files changed, 23 insertions(+), 21 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-joshua/blob/1ec7c925/distribution/joshua-full/README.md
----------------------------------------------------------------------
diff --git a/distribution/joshua-full/README.md b/distribution/joshua-full/README.md
index 8971b5a..c98fdee 100644
--- a/distribution/joshua-full/README.md
+++ b/distribution/joshua-full/README.md
@@ -16,7 +16,7 @@ cluster for the Thrax execution
To deploy joshua-full:
- juju deploy cs:~apachefoundation/joshua-full
+ juju deploy cs:~apachesoftwarefoundation/joshua-full
## Known Limitations and Issues
http://git-wip-us.apache.org/repos/asf/incubator-joshua/blob/1ec7c925/distribution/joshua-full/actions/add-language-pack
----------------------------------------------------------------------
diff --git a/distribution/joshua-full/actions/add-language-pack b/distribution/joshua-full/actions/add-language-pack
index 2bb5803..50f305e 100755
--- a/distribution/joshua-full/actions/add-language-pack
+++ b/distribution/joshua-full/actions/add-language-pack
@@ -20,10 +20,17 @@ set -ex
pack_name=`action-get name`
+if [ "$pack_name" = "es-en" ]; then
wget http://cs.jhu.edu/~post/language-packs/language-pack-es-en-phrase-2015-03-06.tgz -O /tmp/lpack.tgz
+else if [ "$pack_name" = "ar-en" ]; then
+wget http://cs.jhu.edu/~post/language-packs/language-pack-ar-en-phrase-2015-03-18.tgz -O /tmp/lpack.tgz
+else if [ "$pack_name" = "zh-en" ]; then
+wget http://cs.jhu.edu/~post/language-packs/zh-en-hiero-2016-01-13.tgz -O /tmp/lpack.tgz
+fi
-tar xvfz /tmp/lpack.tgz -C /opt/
-rm -rf /opt/language-pack
-mv /opt/language-pack-es-en-phrase-2015-03-06 /opt/language-pack/
+
+mkdir /opt/language-pack
+tar xvfz /tmp/lpack.tgz -C /opt/language-pack --strip-components=1
+rm -rf /tmp/lpack.tgz
charms.reactive set_state languagepack.installed
hooks/update-status
http://git-wip-us.apache.org/repos/asf/incubator-joshua/blob/1ec7c925/distribution/joshua-full/metadata.yaml
----------------------------------------------------------------------
diff --git a/distribution/joshua-full/metadata.yaml b/distribution/joshua-full/metadata.yaml
index 085c0ec..e6f3ca6 100644
--- a/distribution/joshua-full/metadata.yaml
+++ b/distribution/joshua-full/metadata.yaml
@@ -18,15 +18,8 @@
name: joshua-full
summary: Joshua Runtime environment for language translation.
maintainer: Joshua Project <de...@joshua.incubator.apache.org>
-description: |
- Joshua is an open-source statistical machine translation decoder |
- for phrase-based (new in 6.0), hierarchical, and syntax-based |
- machine translation, written in Java. It is developed at the |
- Human Language Technology Center of Excellence at Johns Hopkins |
- University. Currently under incubation at the ASF.
+description: Joshua is an open-source statistical machine translation decoder for phrase-based (new in 6.0), hierarchical, and syntax-based machine translation, written in Java. It is developed at the Human Language Technology Center of Excellence at Johns Hopkins University. Currently under incubation at the ASF.
tags:
- # Replace "misc" with one or more whitelisted tags from this list:
- # https://jujucharms.com/docs/stable/authors-charm-metadata
- big_data
series:
- trusty
http://git-wip-us.apache.org/repos/asf/incubator-joshua/blob/1ec7c925/distribution/joshua-runtime/README.md
----------------------------------------------------------------------
diff --git a/distribution/joshua-runtime/README.md b/distribution/joshua-runtime/README.md
index 07ed4c0..a92af59 100644
--- a/distribution/joshua-runtime/README.md
+++ b/distribution/joshua-runtime/README.md
@@ -16,7 +16,7 @@ their own using the joshua-full charm available in the charm store.
To deploy joshua-runtime:
- juju deploy cs:~apachefoundation/joshua-runtime
+ juju deploy cs:~apachesoftwarefoundation/joshua-runtime
## Known Limitations and Issues
http://git-wip-us.apache.org/repos/asf/incubator-joshua/blob/1ec7c925/distribution/joshua-runtime/actions/add-language-pack
----------------------------------------------------------------------
diff --git a/distribution/joshua-runtime/actions/add-language-pack b/distribution/joshua-runtime/actions/add-language-pack
index 2bb5803..2dbeb28 100755
--- a/distribution/joshua-runtime/actions/add-language-pack
+++ b/distribution/joshua-runtime/actions/add-language-pack
@@ -20,10 +20,17 @@ set -ex
pack_name=`action-get name`
+if [ "$pack_name" = "es-en" ]; then
wget http://cs.jhu.edu/~post/language-packs/language-pack-es-en-phrase-2015-03-06.tgz -O /tmp/lpack.tgz
+elif [ "$pack_name" = "ar-en" ]; then
+wget http://cs.jhu.edu/~post/language-packs/language-pack-ar-en-phrase-2015-03-18.tgz -O /tmp/lpack.tgz
+elif [ "$pack_name" = "zh-en" ]; then
+wget http://cs.jhu.edu/~post/language-packs/zh-en-hiero-2016-01-13.tgz -O /tmp/lpack.tgz
+fi
-tar xvfz /tmp/lpack.tgz -C /opt/
rm -rf /opt/language-pack
-mv /opt/language-pack-es-en-phrase-2015-03-06 /opt/language-pack/
+mkdir /opt/language-pack
+tar xvfz /tmp/lpack.tgz -C /opt/language-pack --strip-components=1
+rm -rf /tmp/lpack.tgz
charms.reactive set_state languagepack.installed
hooks/update-status
http://git-wip-us.apache.org/repos/asf/incubator-joshua/blob/1ec7c925/distribution/joshua-runtime/metadata.yaml
----------------------------------------------------------------------
diff --git a/distribution/joshua-runtime/metadata.yaml b/distribution/joshua-runtime/metadata.yaml
index d173ce2..5f34d1a 100644
--- a/distribution/joshua-runtime/metadata.yaml
+++ b/distribution/joshua-runtime/metadata.yaml
@@ -18,12 +18,7 @@
name: joshua-runtime
summary: Joshua Runtime environment for language translation.
maintainer: Joshua Project <de...@joshua.incubator.apache.org>
-description: |
- Joshua is an open-source statistical machine translation decoder |
- for phrase-based (new in 6.0), hierarchical, and syntax-based |
- machine translation, written in Java. It is developed at the |
- Human Language Technology Center of Excellence at Johns Hopkins |
- University. Currently under incubation at the ASF.
+description: Joshua is an open-source statistical machine translation decoder for phrase-based (new in 6.0), hierarchical, and syntax-based machine translation, written in Java. It is developed at the Human Language Technology Center of Excellence at Johns Hopkins University. Currently under incubation at the ASF.
tags:
- big_data
series: