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

github.com/marian-nmt/marian.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcin Junczys-Dowmunt <junczys@amu.edu.pl>2016-04-23 01:14:39 +0300
committerMarcin Junczys-Dowmunt <junczys@amu.edu.pl>2016-04-23 01:14:39 +0300
commitb6e9b94ec0187a2d7918fc00af44a6f5e734b7cd (patch)
tree8301c9444b14b8d01ea4864b244476b48ae5960d /scripts
parent549e05680d5bedf940648b3086723d71c45b5853 (diff)
fixed overwrite
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/wrapper.pl4
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 {