diff options
author | Yigit Sever | 2019-09-20 16:24:31 +0300 |
---|---|---|
committer | Yigit Sever | 2019-09-20 16:24:31 +0300 |
commit | cd79dd9505453a642c8e11c125d9ebec7f1e064a (patch) | |
tree | ea693e4c2d9cf20fb06103d3ae410a2da16e10cf /demo.sh | |
parent | 540b258332621f34b3b0cb053424563f79402ddc (diff) | |
parent | 2940546c3a9a851fcdb116f9c66fb749183ed3b6 (diff) | |
download | Evaluating-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-x | demo.sh | 22 |
1 files changed, 18 insertions, 4 deletions
@@ -24,14 +24,17 @@ | |||
24 | 24 | ||
25 | ROOT="$(pwd)" | 25 | ROOT="$(pwd)" |
26 | SCRIPTS="${ROOT}/scripts" | 26 | SCRIPTS="${ROOT}/scripts" |
27 | |||
27 | WNET="${ROOT}/wordnets" | 28 | WNET="${ROOT}/wordnets" |
28 | EMBS="${ROOT}/embeddings" | 29 | TAB_DIR="${WNET}/tab_files" |
29 | DICT="${ROOT}/dictionaries" | 30 | READY="${WNET}/ready" |
30 | 31 | ||
32 | DICT="${ROOT}/dictionaries" | ||
31 | TRAIN_DIR="${DICT}/train" | 33 | TRAIN_DIR="${DICT}/train" |
32 | TEST_DIR="${DICT}/test" | 34 | TEST_DIR="${DICT}/test" |
33 | TAB_DIR="${WNET}/tab_files" | 35 | |
34 | READY="${WNET}/ready" | 36 | EMBS="${ROOT}/embeddings" |
37 | MAP_TO="${ROOT}/bilingual_embeddings" | ||
35 | 38 | ||
36 | # create wordnets directory and download a single wordnet | 39 | # create wordnets directory and download a single wordnet |
37 | mkdir -p "${WNET}" | 40 | mkdir -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 | |||
91 | mkdir -p "${MAP_TO}" # create bilingual embeddings directory | ||
92 | source_lang="en" | ||
93 | target_lang="bg" | ||
94 | |||
95 | python "${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 | ||