Welcome to mirror list, hosted at ThFree Co, Russian Federation.

run.perl « misc.lexical-weights « tests - github.com/moses-smt/moses-regression-tests.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 507bcdd5af5a27c2f9c67f7fb9199af737d0e91d (plain)
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
#!/usr/bin/perl -w 

use strict;
my $script_dir; BEGIN { use Cwd qw/ abs_path /; use File::Basename; $script_dir = dirname(abs_path($0)); push @INC, $script_dir; }
use MosesRegressionTesting;
use Getopt::Long;
use File::Temp qw ( tempfile );
use POSIX qw ( strftime );



my ($mosesRoot, $mosesBin, $test_name, $data_dir, $test_dir, $results_dir);

GetOptions("moses-root=s" => \$mosesRoot,
           "moses-bin=s" => \$mosesBin,
           "test=s"    => \$test_name,
           "data-dir=s"=> \$data_dir,
           "test-dir=s"=> \$test_dir,
           "results-dir=s"=> \$results_dir,
          ) or exit 1;

require "$mosesRoot/scripts/training/LexicalTranslationModel.pm"; 
"LexicalTranslationModel"->import; 

&get_lexical("$test_dir/$test_name/fr", "$test_dir/$test_name/en",
              "$test_dir/$test_name/align.fr-en", "$results_dir/out",
              0, "","");

system("LC_ALL=C sort $results_dir/out.f2e $results_dir/out.e2f > $results_dir/out");