aboutsummaryrefslogtreecommitdiffstats
path: root/demo.sh
diff options
context:
space:
mode:
authorYigit Sever2019-09-20 16:24:31 +0300
committerYigit Sever2019-09-20 16:24:31 +0300
commitcd79dd9505453a642c8e11c125d9ebec7f1e064a (patch)
treeea693e4c2d9cf20fb06103d3ae410a2da16e10cf /demo.sh
parent540b258332621f34b3b0cb053424563f79402ddc (diff)
parent2940546c3a9a851fcdb116f9c66fb749183ed3b6 (diff)
downloadEvaluating-Dictionary-Alignment-cd79dd9505453a642c8e11c125d9ebec7f1e064a.tar.gz
Evaluating-Dictionary-Alignment-cd79dd9505453a642c8e11c125d9ebec7f1e064a.tar.bz2
Evaluating-Dictionary-Alignment-cd79dd9505453a642c8e11c125d9ebec7f1e064a.zip
Merge branch 'master' of github.com:yigitsever/Evaluating-Dictionary-Alignment
Diffstat (limited to 'demo.sh')
-rwxr-xr-xdemo.sh22
1 files changed, 18 insertions, 4 deletions
diff --git a/demo.sh b/demo.sh
index acb7c2f..990a106 100755
--- a/demo.sh
+++ b/demo.sh
@@ -24,14 +24,17 @@
24 24
25ROOT="$(pwd)" 25ROOT="$(pwd)"
26SCRIPTS="${ROOT}/scripts" 26SCRIPTS="${ROOT}/scripts"
27
27WNET="${ROOT}/wordnets" 28WNET="${ROOT}/wordnets"
28EMBS="${ROOT}/embeddings" 29TAB_DIR="${WNET}/tab_files"
29DICT="${ROOT}/dictionaries" 30READY="${WNET}/ready"
30 31
32DICT="${ROOT}/dictionaries"
31TRAIN_DIR="${DICT}/train" 33TRAIN_DIR="${DICT}/train"
32TEST_DIR="${DICT}/test" 34TEST_DIR="${DICT}/test"
33TAB_DIR="${WNET}/tab_files" 35
34READY="${WNET}/ready" 36EMBS="${ROOT}/embeddings"
37MAP_TO="${ROOT}/bilingual_embeddings"
35 38
36# create wordnets directory and download a single wordnet 39# create wordnets directory and download a single wordnet
37mkdir -p "${WNET}" 40mkdir -p "${WNET}"
@@ -84,3 +87,14 @@ python "${ROOT}/vecmap/map_embeddings.py" --supervised \
84 "${EMBS}/bg.vec" \ 87 "${EMBS}/bg.vec" \
85 "${MAP_TO}/en_to_bg.vec" \ 88 "${MAP_TO}/en_to_bg.vec" \
86 "${MAP_TO}/bg_to_en.vec" > /dev/null 2>&1 89 "${MAP_TO}/bg_to_en.vec" > /dev/null 2>&1
90
91mkdir -p "${MAP_TO}" # create bilingual embeddings directory
92source_lang="en"
93target_lang="bg"
94
95python "${ROOT}/vecmap/map_embeddings.py" --supervised \
96 "${TRAIN_DIC_DIR}/${source_lang}_${target_lang}.train" \
97 "${EMBS}/${source_lang}.vec" \
98 "${EMBS}/${target_lang}.vec" \
99 "${MAP_TO}/${source_lang}_to_${target_lang}.vec" \
100 "${MAP_TO}/${target_lang}_to_${source_lang}.vec" > /dev/null 2>&1