diff options
author | phikoehn <pkoehn@inf.ed.ac.uk> | 2012-06-26 02:37:01 +0400 |
---|---|---|
committer | phikoehn <pkoehn@inf.ed.ac.uk> | 2012-06-26 02:37:01 +0400 |
commit | 9bbe553a863cad1ffffd382f17e46135ea5567d6 (patch) | |
tree | 857356f35722f158a6c1ca2777f4775a6b58649f /scripts | |
parent | 2d3b4d9b7c6f08d014bb430450fa5ea0cecf4b3b (diff) |
allow nbest distinct in experiment.perl
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/ems/experiment.perl | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/scripts/ems/experiment.perl b/scripts/ems/experiment.perl index b0e71c969..ee6b47850 100755 --- a/scripts/ems/experiment.perl +++ b/scripts/ems/experiment.perl @@ -2231,7 +2231,9 @@ sub define_evaluation_decode { # create command my $cmd; - $nbest =~ s/[^\d]//g if $nbest; + my $nbest_size; + $nbest_size = $nbest if $nbest; + $nbest_size =~ s/[^\d]//g if $nbest; if ($jobs && $CLUSTER) { $cmd .= "mkdir -p $dir/evaluation/tmp.$set.$VERSION\n"; $cmd .= "cd $dir/evaluation/tmp.$set.$VERSION\n"; @@ -2247,11 +2249,11 @@ sub define_evaluation_decode { $cmd .= " -input-file $input"; $cmd .= " --jobs $jobs"; $cmd .= " -decoder-parameters \"$settings\" > $system_output"; - $cmd .= " -n-best-file $system_output.best$nbest -n-best-size $nbest" if $nbest; + $cmd .= " -n-best-file $system_output.best$nbest_size -n-best-size $nbest" if $nbest; } else { $cmd = "$decoder $settings -v 0 -f $config < $input > $system_output"; - $cmd .= " -n-best-list $system_output.best$nbest $nbest" if $nbest; + $cmd .= " -n-best-list $system_output.best$nbest_size $nbest" if $nbest; } &create_step($step_id,$cmd); |