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

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'regression-testing/tests/score.phrase-based-with-alignment-inv/run-test-scorer.perl')
-rwxr-xr-xregression-testing/tests/score.phrase-based-with-alignment-inv/run-test-scorer.perl65
1 files changed, 0 insertions, 65 deletions
diff --git a/regression-testing/tests/score.phrase-based-with-alignment-inv/run-test-scorer.perl b/regression-testing/tests/score.phrase-based-with-alignment-inv/run-test-scorer.perl
deleted file mode 100755
index bdf1fa620..000000000
--- a/regression-testing/tests/score.phrase-based-with-alignment-inv/run-test-scorer.perl
+++ /dev/null
@@ -1,65 +0,0 @@
-#!/usr/bin/perl -w
-
-use strict;
-use FindBin qw($Bin);
-use MosesRegressionTesting;
-use Getopt::Long;
-use File::Temp qw ( tempfile );
-use POSIX qw ( strftime );
-
-my $scoreExe;
-my $test_name;
-my $data_dir;
-my $test_dir;
-my $results_dir;
-
-GetOptions("scorer=s" => \$scoreExe,
- "test=s" => \$test_name,
- "data-dir=s"=> \$data_dir,
- "test-dir=s"=> \$test_dir,
- "results-dir=s"=> \$results_dir,
- ) or exit 1;
-
-# output dir
-unless (defined $results_dir)
-{
- my $ts = get_timestamp($scoreExe);
- $results_dir = "$data_dir/results/$test_name/$ts";
-}
-
-`mkdir -p $results_dir`;
-
-my $outPath = "$results_dir/phrase-table.4.half.e2f";
-
-my $cmdMain = "$scoreExe $test_dir/$test_name/extract.inv.sorted $test_dir/$test_name/lex.e2f $outPath --Inverse --GoodTuring \n";
-`$cmdMain`;
-
-my $truthPath = "$test_dir/$test_name/truth/results.txt";
-my $cmd = "diff $outPath $truthPath | wc -l";
-
-my $numDiff = `$cmd`;
-
-if ($numDiff == 0)
-{
- # print STDERR "FAILURE. Ran $cmdMain\n";
- print STDERR "SUCCESS\n";
- exit 0;
-}
-else
-{
- print STDERR "FAILURE. Ran $cmdMain\n";
- exit 1;
-}
-
-sub get_timestamp {
- my ($file) = @_;
- my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,
- $atime,$mtime,$ctime,$blksize,$blocks)
- = stat($file);
- my $timestamp = strftime("%Y%m%d-%H%M%S", gmtime $mtime);
- my $timestamp2 = strftime("%Y%m%d-%H%M%S", gmtime);
- my $username = `whoami`; chomp $username;
- return "moses.v$timestamp-$username-at-$timestamp2";
-}
-
-