In the parsing wrapper scripts, use only the basename of the script

(rather than the full path) when generating the path of the temporary
directory.


git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/branches/mt3_chart@3069 1f5c12ca-751b-0410-a591-d2e778427230
This commit is contained in:
pjwilliams 2010-04-07 13:13:26 +00:00
parent d64a370e67
commit 4026dfeedb
2 changed files with 6 additions and 2 deletions

View File

@ -3,6 +3,7 @@
use strict;
use Getopt::Long "GetOptions";
use FindBin qw($Bin);
use File::Basename;
use File::Temp qw/tempfile/;
my $BITPAR = "/home/pkoehn/statmt/project/bitpar/GermanParser";
@ -20,7 +21,8 @@ GetOptions(
) or die("ERROR: unknown options");
`mkdir -p $TMPDIR`;
my ($TMP, $tmpfile) = tempfile("$0-XXXXXXXXXX", DIR=>$TMPDIR, UNLINK=>1);
my ($scriptname, $directories) = fileparse($0);
my ($TMP, $tmpfile) = tempfile("$scriptname-XXXXXXXXXX", DIR=>$TMPDIR, UNLINK=>1);
open(INPUT,"iconv -c -f utf8 -t iso-8859-1 |");
while(<INPUT>)
{

View File

@ -1,6 +1,7 @@
#!/usr/bin/perl -w
use strict;
use File::Basename;
use File::Temp qw/tempfile/;
use Getopt::Long "GetOptions";
my $COLLINS = "/home/pkoehn/statmt/project/collins-parser.linux";
@ -21,7 +22,8 @@ GetOptions(
`mkdir -p $TMPDIR`;
my ($TMP, $tmpfile) = tempfile("$0-XXXXXXXXXX", DIR=>$TMPDIR, UNLINK=>1);
my ($scriptname, $directories) = fileparse($0);
my ($TMP, $tmpfile) = tempfile("$scriptname-XXXXXXXXXX", DIR=>$TMPDIR, UNLINK=>1);
open(MXPOST,"$MXPOST/mxpost.unicode $MXPOST/tagger.project |");
while(<MXPOST>)