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:
authorHieu Hoang <fishandfrolick@gmail.com>2012-05-31 20:58:10 +0400
committerHieu Hoang <fishandfrolick@gmail.com>2012-05-31 20:58:10 +0400
commita5ca652a766ddb687891adac8e7ef252fa2f430d (patch)
tree7cac031a4a7d688369e0fd4538a65d855b6c390e /regression-testing
parent4eef94b1217a82eb979242dd3e06d8a4b6255e6e (diff)
move c++ code out of /script/ to /
Diffstat (limited to 'regression-testing')
-rw-r--r--regression-testing/MosesRegressionTesting.pm2
-rwxr-xr-xregression-testing/run-test-mert.perl8
-rwxr-xr-xregression-testing/run-test-suite.perl20
3 files changed, 12 insertions, 18 deletions
diff --git a/regression-testing/MosesRegressionTesting.pm b/regression-testing/MosesRegressionTesting.pm
index f4b3ce099..9dc114d9c 100644
--- a/regression-testing/MosesRegressionTesting.pm
+++ b/regression-testing/MosesRegressionTesting.pm
@@ -5,7 +5,7 @@ use strict;
# if your tests need a new version of the test data, increment this
# and make sure that a moses-regression-tests-vX.Y is available for
# download from statmt.org (redpony AT umd dot edu for more info)
-use constant TESTING_DATA_VERSION => '10';
+use constant TESTING_DATA_VERSION => '11';
# find the data directory in a few likely locations and make sure
# that it is the correct version
diff --git a/regression-testing/run-test-mert.perl b/regression-testing/run-test-mert.perl
index a9e0b290d..e22d152df 100755
--- a/regression-testing/run-test-mert.perl
+++ b/regression-testing/run-test-mert.perl
@@ -10,14 +10,14 @@ my @SIGS = qw ( SIGHUP SIGINT SIGQUIT SIGILL SIGTRAP SIGABRT SIGIOT SIGBUS SIGFP
my ($decoder, $test_name);
my $test_dir = "$script_dir/tests";
-my $mert_dir = "$script_dir/../mert";
+my $bin_dir = "$script_dir/../bin";
my $data_dir;
my $BIN_TEST = $script_dir;
my $results_dir;
GetOptions("test=s" => \$test_name,
"data-dir=s"=> \$data_dir,
- "mert-dir=s"=> \$mert_dir,
+ "bin-dir=s"=> \$bin_dir,
"test-dir=s"=> \$test_dir,
"results-dir=s"=> \$results_dir,
) or exit 1;
@@ -26,7 +26,7 @@ die "Please specify a test to run with --test\n" unless $test_name;
die "Please specify the location of the data directory with --data-dir\n" unless $data_dir;
-die "Please specify the location of the mert directory with --mert-dir\n" unless $mert_dir;
+die "Please specify the location of the mert directory with --mert-dir\n" unless $bin_dir;
die "Cannot locate test dir at $test_dir" unless (-d $test_dir);
@@ -92,7 +92,7 @@ exit 0;
sub exec_test {
my ($test_dir,$results) = @_;
my $start_time = time;
- my ($o, $ec, $sig) = run_command("sh $test_dir/command $mert_dir $test_dir 1> $results/run.stdout 2> $results/run.stderr");
+ my ($o, $ec, $sig) = run_command("sh $test_dir/command $bin_dir $test_dir 1> $results/run.stdout 2> $results/run.stderr");
my $elapsed = 0;
$elapsed = time - $start_time;
return ($o, $elapsed, $ec, $sig);
diff --git a/regression-testing/run-test-suite.perl b/regression-testing/run-test-suite.perl
index 08ff458bf..f09f4b31f 100755
--- a/regression-testing/run-test-suite.perl
+++ b/regression-testing/run-test-suite.perl
@@ -60,19 +60,17 @@ use MosesRegressionTesting;
use File::Temp qw ( tempfile );
use POSIX qw ( strftime );
-my $decoderPhrase = "$Bin/../moses-cmd/src/moses";
-my $decoderChart = "$Bin/../moses-chart-cmd/src/moses_chart";
-my $scoreExe = "$Bin/../scripts/training/phrase-extract/score";
-my $extractorExe = "$Bin/../scripts/training/phrase-extract/extract";
-my $extractorRulesExe = "$Bin/../scripts/training/phrase-extract/extract-rules";
-my $kenlmBinarizer = "$Bin/../kenlm/build_binary";
+my $decoderPhrase = "$Bin/../bin/moses";
+my $decoderChart = "$Bin/../bin/moses_chart";
+my $scoreExe = "$Bin/../bin/score";
+my $extractorExe = "$Bin/../bin/extract";
+my $extractorRulesExe = "$Bin/../bin/extract-rules";
+my $kenlmBinarizer = "$Bin/../bin/build_binary";
my $test_dir;
my $BIN_TEST = $script_dir;
my $data_dir;
-GetOptions( "decoder-phrase=s" => \$decoderPhrase,
- "decoder-chart=s" => \$decoderChart,
- "data-dir=s" => \$data_dir,
+GetOptions("data-dir=s" => \$data_dir,
) or exit 1;
@@ -84,10 +82,6 @@ $test_run .= " --test-dir=$test_dir" if $test_dir;
print "Data directory: $data_dir\n";
-die "Please specify the phrase-based decoder & the chart decoder to test with --decoder-phrase=[path] --decoder-chart=[path] \n" unless ($decoderPhrase and $decoderChart);
-
-die "Cannot locate executable called $decoderPhrase\n" unless (-x $decoderPhrase);
-
print "Running tests: @tests\n\n";
print "TEST NAME STATUS PATH TO RESULTS\n";