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

filter-stderr.pl « phrase.confusionNet-surface-only.mem « tests - github.com/moses-smt/moses-regression-tests.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 2f6e176073f22e139e9cbe9f49448afb1b4170f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/perl

BEGIN { use Cwd qw/ abs_path /; use File::Basename; $script_dir = dirname(abs_path($0)); push @INC, "$script_dir/../perllib"; }
use RegTestUtils;

$x=0;
while (<>) {
  chomp;

  if (/^Finished loading LanguageModels/) {
    my $time = RegTestUtils::readTime($_);
    print "LMLOAD_TIME ~ $time\n";
  }
  if (/^Finished loading phrase tables/) {
    my $time = RegTestUtils::readTime($_);
    print "PTLOAD_TIME ~ $time\n";
  }
  next unless /^BEST TRANSLATION:/;
  my $pscore = RegTestUtils::readHypoScore($_);
  $x++;
  print "SCORE_$x = $pscore\n";
}