-
Notifications
You must be signed in to change notification settings - Fork 29
/
evaluate_all_languages.sh
executable file
·46 lines (37 loc) · 1.08 KB
/
evaluate_all_languages.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
#!/bin/bash
# Usage:
# evaluate_all_languages.sh <corpus> <output-folder>
set -e
corpus_fn=$1
out_folder=$2
langs=("ar" "uk" "he" "ru" "it" "fr" "es" "de")
mt_systems=("sota" "aws" "bing" "google" "systran" )
# Make sure systran has all translations
# for lang in ${langs[@]}
# do
# echo "Translating $lang with systran..."
# ../scripts/systran_language.sh $corpus_fn $lang
# done
for trans_sys in ${mt_systems[@]}
do
for lang in ${langs[@]}
do
echo "evaluating $trans_sys, $lang"
if [[ "$lang" == "uk" && "$trans_sys" == "aws" ]]; then
echo "skipping.."
continue
fi
if [[ "$trans_sys" == "sota" ]]; then
if [[ "$lang" != "de" && "$lang" != "fr" ]]; then
echo "skipping.."
continue
fi
fi
# Run evaluation
mkdir -p $out_folder/$trans_sys
out_file=$out_folder/$trans_sys/$lang.log
echo "Evaluating $lang into $out_file"
../scripts/evaluate_language.sh $corpus_fn $lang $trans_sys # > $out_file
done
done
echo "DONE!"