aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/train_dic_creator.pl
diff options
context:
space:
mode:
authorYigit Sever2019-09-17 21:43:47 +0300
committerYigit Sever2019-09-17 21:48:00 +0300
commitac340e27a3ef07b2109e0d7416d9516c08acbcd3 (patch)
tree02d9db921214ae7796575e7ff9f80a895082285f /scripts/train_dic_creator.pl
parent2ba704a6fced5722a1f1e3da464185e3724a57d2 (diff)
parent576377215513e097d805fc1ed33b8613bdd2e43f (diff)
downloadEvaluating-Dictionary-Alignment-ac340e27a3ef07b2109e0d7416d9516c08acbcd3.tar.gz
Evaluating-Dictionary-Alignment-ac340e27a3ef07b2109e0d7416d9516c08acbcd3.tar.bz2
Evaluating-Dictionary-Alignment-ac340e27a3ef07b2109e0d7416d9516c08acbcd3.zip
Merge branch 'master' of github.com:yigitsever/Evaluating-Dictionary-Alignment
Diffstat (limited to 'scripts/train_dic_creator.pl')
-rwxr-xr-xscripts/train_dic_creator.pl10
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/train_dic_creator.pl b/scripts/train_dic_creator.pl
index 448fecf..0a9f931 100755
--- a/scripts/train_dic_creator.pl
+++ b/scripts/train_dic_creator.pl
@@ -44,7 +44,7 @@ if (not defined $cutoff && $cutoff ne '') {
44} 44}
45 45
46if (not defined $dict_dir && $dict_dir ne '') { 46if (not defined $dict_dir && $dict_dir ne '') {
47 $dict_dir = './dictionaries/'; 47 $dict_dir = '../dictionaries';
48} 48}
49 49
50my $flipped = 0; 50my $flipped = 0;
@@ -106,11 +106,11 @@ my $size = $cutoff / 2;
106my @head = @result[0..$size - 1]; 106my @head = @result[0..$size - 1];
107my @tail = @result[-$size..-1]; 107my @tail = @result[-$size..-1];
108 108
109my $train_file_name = $source_lang . '_' . $target_lang . '.train'; 109my $train_file_name = "$dict_dir/$source_lang_$target_lang.train';
110my $test_file_name = $source_lang . '_' . $target_lang . '.test'; 110my $test_file_name = "$dict_dir/$source_lang_$target_lang.test';
111 111
112open my $train_fh, '>', $dict_dir . $train_file_name; 112open my $train_fh, '>', $train_file_name;
113open my $test_fh, '>', $dict_dir . $test_file_name; 113open my $test_fh, '>', $test_file_name;
114 114
115print $train_fh join("\n", @head); 115print $train_fh join("\n", @head);
116print $test_fh join("\n", @tail); 116print $test_fh join("\n", @tail);