Skip to content

Commit

Permalink
minor experiment.perl fixes
Browse files Browse the repository at this point in the history
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@3668 1f5c12ca-751b-0410-a591-d2e778427230
  • Loading branch information
phkoehn committed Oct 27, 2010
1 parent 46b59cb commit 7334d49
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scripts/ems/experiment.perl
Original file line number Diff line number Diff line change
Expand Up @@ -835,9 +835,9 @@ sub draw_agenda_graph {
$step .= " (".$RE_USE[$i].")" if $RE_USE[$i];

my $color = "green";
$color = "lightblue" if $RE_USE[$i];
$color = "#0000ff" if defined($DO{$i}) && $DO{$i} >= 1;
$color = "#8080ff" if defined($DONE{$i}) || ($RE_USE[$i] && $RE_USE[$i] == $VERSION);
$color = "lightblue" if $RE_USE[$i] && $RE_USE[$i] != $VERSION;
$color = "red" if defined($CRASHED{$i});
$color = "lightyellow" if defined($PASS{$i});

Expand Down
2 changes: 1 addition & 1 deletion scripts/ems/support/report-experiment-scores.perl
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ sub extract_nist_bleu {
$bleu = $1*100 if /BLEU score = (\S+)/;
$ratio = int(1000*$1)/1000 if /length ratio: (\S+)/;
}
if (!$bleu) {
if (!defined($bleu)) {
print STDERR "ERROR (extract_nist_bleu): could not find BLEU score in file '$file'\n";
return "";
}
Expand Down
5 changes: 5 additions & 0 deletions scripts/ems/support/run-command-on-multiple-refsets.perl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
unless scalar @ARGV == 3;
my ($cmd,$in,$out) = @ARGV;

die("ERROR: attempt to run on multiple references, but there is only one")
if -e $in && ! -e "$in.ref0";
die("ERROR: did not find reference '$in.ref0'")
unless -e "$in.ref0";

for(my $i=0;-e "$in.ref$i";$i++) {
my $single_cmd = $cmd;
$single_cmd =~ s/mref-input-file/$in.ref$i/g;
Expand Down

0 comments on commit 7334d49

Please sign in to comment.