aboutsummaryrefslogtreecommitdiffstats
path: root/get_embeddings.sh
diff options
context:
space:
mode:
authorYigit Sever2019-09-19 00:17:16 +0300
committerYigit Sever2019-09-19 00:17:16 +0300
commitf9bc1db3284f2bf05f7b1cf55ab912363c6e8440 (patch)
treea691d726fc460d0ed0678a8ad56aad170eb21de6 /get_embeddings.sh
parent68b6c55d0e3217362d6e17ea8458dfa7e5242e17 (diff)
downloadEvaluating-Dictionary-Alignment-f9bc1db3284f2bf05f7b1cf55ab912363c6e8440.tar.gz
Evaluating-Dictionary-Alignment-f9bc1db3284f2bf05f7b1cf55ab912363c6e8440.tar.bz2
Evaluating-Dictionary-Alignment-f9bc1db3284f2bf05f7b1cf55ab912363c6e8440.zip
Use variables as much as possible
Diffstat (limited to 'get_embeddings.sh')
-rwxr-xr-xget_embeddings.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/get_embeddings.sh b/get_embeddings.sh
index daf839b..47a7a8e 100755
--- a/get_embeddings.sh
+++ b/get_embeddings.sh
@@ -25,6 +25,7 @@ set -o errexit -o pipefail -o noclobber -o nounset
25 25
26ROOT="$(pwd)" 26ROOT="$(pwd)"
27EMBS="${ROOT}/embeddings" 27EMBS="${ROOT}/embeddings"
28DICT="${ROOT}/dictionaries"
28mkdir -p "${EMBS}" 29mkdir -p "${EMBS}"
29 30
30echo "Downloading embeddings" 31echo "Downloading embeddings"
@@ -58,15 +59,15 @@ if [ ! "$(ls -A "${ROOT}/vecmap/")" ]; then
58 echo "VecMap directory seems empty, did you run git submodule init && git submodule update?"; exit 59 echo "VecMap directory seems empty, did you run git submodule init && git submodule update?"; exit
59fi 60fi
60 61
61if [ ! -d "${ROOT}/dictionaries" ]; then 62if [ ! -d "${DICT}" ]; then
62 echo "Dictionaries directory does not exist, did you run ./get_data.sh?"; exit 63 echo "Dictionaries directory does not exist, did you run ./get_data.sh?"; exit
63fi 64fi
64 65
65if [ ! "$(ls -A "${ROOT}/dictionaries/")" ]; then 66if [ ! "$(ls -A "${DICT}")" ]; then
66 echo "Dictionaries directory seems empty, did you run ./get_data.sh?"; exit 67 echo "Dictionaries directory seems empty, did you run ./get_data.sh?"; exit
67fi 68fi
68 69
69TRAIN_DIC_DIR="${ROOT}/dictionaries/train" 70TRAIN_DIC_DIR="${DICT}/train"
70MAP_TO="${ROOT}/bilingual_embeddings" 71MAP_TO="${ROOT}/bilingual_embeddings"
71 72
72mkdir -p "${MAP_TO}" 73mkdir -p "${MAP_TO}"