diff options
| -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 | ||
