diff options
author | Marcin Junczys-Dowmunt <junczys@amu.edu.pl> | 2016-04-23 01:14:39 +0300 |
---|---|---|
committer | Marcin Junczys-Dowmunt <junczys@amu.edu.pl> | 2016-04-23 01:14:39 +0300 |
commit | b6e9b94ec0187a2d7918fc00af44a6f5e734b7cd (patch) | |
tree | 8301c9444b14b8d01ea4864b244476b48ae5960d /scripts | |
parent | 549e05680d5bedf940648b3086723d71c45b5853 (diff) |
fixed overwrite
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/wrapper.pl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/wrapper.pl b/scripts/wrapper.pl index 2bef3068..83cd2527 100755 --- a/scripts/wrapper.pl +++ b/scripts/wrapper.pl @@ -1,6 +1,7 @@ #!/usr/bin/perl use strict; +use POSIX; my $PID = $$; @@ -32,7 +33,8 @@ else { my $input = $1; print STDERR "OPTS: $opts\n"; execute("$MOSES $opts"); - execute("$RESCORER_WRAPPER -r $RESCORER $MODELS $FEATURES -s $SVCB -t $TVCB -n $nbest -i $input -w features.list > $nbest"); + execute("$RESCORER_WRAPPER -r $RESCORER $MODELS $FEATURES -s $SVCB -t $TVCB -n $nbest -i $input -w features.list > $nbest.temp"); + rename("$nbest.temp", $nbest); } sub execute { |