diff options
author | Yigit Sever | 2019-09-17 21:56:38 +0300 |
---|---|---|
committer | Yigit Sever | 2019-09-17 21:56:38 +0300 |
commit | b518b5a88cf7556734026362f9f6ed41614c3dec (patch) | |
tree | 15de596d94b1136ccdd93ff660fadbfc986813a3 | |
parent | b48ed0ead118bc50ce71345b303d6988c74dbc08 (diff) | |
download | Evaluating-Dictionary-Alignment-b518b5a88cf7556734026362f9f6ed41614c3dec.tar.gz Evaluating-Dictionary-Alignment-b518b5a88cf7556734026362f9f6ed41614c3dec.tar.bz2 Evaluating-Dictionary-Alignment-b518b5a88cf7556734026362f9f6ed41614c3dec.zip |
Bug fix
-rwxr-xr-x | get_data.sh | 2 | ||||
-rwxr-xr-x | scripts/train_dic_creator.pl | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/get_data.sh b/get_data.sh index 068c776..2d04678 100755 --- a/get_data.sh +++ b/get_data.sh | |||
@@ -40,7 +40,7 @@ echo "Unzipping wordnet data" | |||
40 | 40 | ||
41 | for lang in als bul ell ita ron slv; do | 41 | for lang in als bul ell ita ron slv; do |
42 | unzip -o -q "${WNET}/${lang}.zip" -d "${WNET}" | 42 | unzip -o -q "${WNET}/${lang}.zip" -d "${WNET}" |
43 | rm -f "${WNET}/${lang}.zip" | 43 | #rm -f "${WNET}/${lang}.zip" |
44 | done | 44 | done |
45 | 45 | ||
46 | rm -rf "${WNET}/ita/" # comes alongside iwn, not useful for us | 46 | rm -rf "${WNET}/ita/" # comes alongside iwn, not useful for us |
diff --git a/scripts/train_dic_creator.pl b/scripts/train_dic_creator.pl index 0a9f931..e7b1253 100755 --- a/scripts/train_dic_creator.pl +++ b/scripts/train_dic_creator.pl | |||
@@ -58,7 +58,7 @@ if (-e "$dict_dir/$target_lang-$source_lang.dic") { | |||
58 | $file_name = "$source_lang-$target_lang.dic"; | 58 | $file_name = "$source_lang-$target_lang.dic"; |
59 | } | 59 | } |
60 | 60 | ||
61 | my $file_path = $dict_dir . $file_name; | 61 | my $file_path = "${dict_dir}/${file_name}"; |
62 | 62 | ||
63 | local @ARGV = $file_path; | 63 | local @ARGV = $file_path; |
64 | local $^I = '.bak'; | 64 | local $^I = '.bak'; |
@@ -106,8 +106,8 @@ my $size = $cutoff / 2; | |||
106 | my @head = @result[0..$size - 1]; | 106 | my @head = @result[0..$size - 1]; |
107 | my @tail = @result[-$size..-1]; | 107 | my @tail = @result[-$size..-1]; |
108 | 108 | ||
109 | my $train_file_name = "$dict_dir/$source_lang_$target_lang.train'; | 109 | my $train_file_name = "${dict_dir}/${source_lang}_${target_lang}.train"; |
110 | my $test_file_name = "$dict_dir/$source_lang_$target_lang.test'; | 110 | my $test_file_name = "${dict_dir}/${source_lang}_${target_lang}.test"; |
111 | 111 | ||
112 | open my $train_fh, '>', $train_file_name; | 112 | open my $train_fh, '>', $train_file_name; |
113 | open my $test_fh, '>', $test_file_name; | 113 | open my $test_fh, '>', $test_file_name; |