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

filter-nbest.pl « phrase.word-translation.nbest « defer - github.com/moses-smt/moses-regression-tests.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 0b147e57e2d7a174d64bdda81fb1aa51fdc3aad6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/usr/bin/env perl
$x=0;
$oldcode = "";
while (<>) {
  chomp;
  ($code,$trans,$featscores,$globscores) = split(/[\s]*\|\|\|[\s]*/,$_);
  $x = 0 if $oldcode ne $code;
  $x++;
  chomp($code);
  print "TRANSLATION_${code}_NBEST_${x}=$trans ||| $featscores\n";
  $oldcode = $code;
}