-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathfasttext_xling_es.sh
79 lines (71 loc) · 3.53 KB
/
fasttext_xling_es.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#!/usr/bin/env bash
#!/usr/bin/env bash
#for similarity_type in "cosine" ; do
for similarity_type in "cosine" "euclidean" ; do
targets_language="es"
for attributes_language in "en" "de" "hr" "it" "ru" "tr" ; do
for test_number in 6 7 8 9 10 1 2 ; do
xspace=${targets_language}-${attributes_language}
echo $targets_language
echo $attributes_language
echo $similarity_type
echo $test_number
dir_1="/work/gglavas/data/word_embs/yacle/mappings/new/smith/fasttext/${xspace}"
if [ -d "$dir_1" ]; then
embedding_dir=$dir_1
echo $embedding_dir
python xweat.py \
--test_number $test_number \
--permutation_number 1000000 \
--output_file ./results/ft_xling_space-${xspace}_ta-${targets_language}-${attributes_language}_${similarity_type}_${test_number}.res \
--lower True \
--use_glove False \
--targets_lang $targets_language \
--attributes_lang $attributes_language \
--targets_embedding_vocab \
${embedding_dir}/${targets_language}.vocab \
--targets_embedding_vectors \
${embedding_dir}/${targets_language}.vectors \
--attributes_embedding_vocab \
${embedding_dir}/${attributes_language}.vocab \
--attributes_embedding_vectors \
${embedding_dir}/${attributes_language}.vectors \
--similarity_type $similarity_type |& tee ./results/ft_xling_space-${xspace}_ta-${targets_language}-${attributes_language}_${similarity_type}_${test_number}.out
fi
done
done
done
for similarity_type in "cosine" "euclidean" ; do
attributes_language="es"
for targets_language in "en" "de" "hr" "it" "ru" "tr" ; do
for test_number in 6 7 8 9 10 1 2 ; do
xspace=${attributes_language}-${targets_language}
echo $targets_language
echo $attributes_language
echo $similarity_type
echo $test_number
dir_1="/work/gglavas/data/word_embs/yacle/mappings/new/smith/fasttext/${xspace}"
if [ -d "$dir_1" ]; then
embedding_dir=$dir_1
echo $embedding_dir
python xweat.py \
--test_number $test_number \
--permutation_number 1000000 \
--output_file ./results/ft_xling_space-${xspace}_ta-${targets_language}-${attributes_language}_${similarity_type}_${test_number}.res \
--lower True \
--use_glove False \
--targets_lang $targets_language \
--attributes_lang $attributes_language \
--targets_embedding_vocab \
${embedding_dir}/${targets_language}.vocab \
--targets_embedding_vectors \
${embedding_dir}/${targets_language}.vectors \
--attributes_embedding_vocab \
${embedding_dir}/${attributes_language}.vocab \
--attributes_embedding_vectors \
${embedding_dir}/${attributes_language}.vectors \
--similarity_type $similarity_type |& tee ./results/ft_xling_space-${xspace}_ta-${targets_language}-${attributes_language}_${similarity_type}_${test_number}.out
fi
done
done
done