diff options
author | Hieu Hoang <fishandfrolick@gmail.com> | 2012-06-26 19:54:16 +0400 |
---|---|---|
committer | Hieu Hoang <fishandfrolick@gmail.com> | 2012-06-26 19:57:23 +0400 |
commit | debe09042675315bb0baddb1900bd66e3a2c5af5 (patch) | |
tree | 35ac030460d57d0715c3ec3af907a1e5aa6bbb34 /scripts | |
parent | 7cd83567523aba0bea371e32ae4d3282f3bbf34d (diff) |
Change Bin to RealBin. Thanks to Tom Hoar
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/analysis/weight-scan.pl | 4 | ||||
-rwxr-xr-x | scripts/ems/experiment.perl | 8 | ||||
-rwxr-xr-x | scripts/ems/support/split-sentences.perl | 4 | ||||
-rwxr-xr-x | scripts/generic/trainlm-irst.perl | 2 | ||||
-rwxr-xr-x | scripts/tokenizer/tokenizer.perl | 4 | ||||
-rwxr-xr-x | scripts/training/filter-model-given-input.pl | 4 | ||||
-rwxr-xr-x | scripts/training/mert-moses-multi.pl | 4 | ||||
-rwxr-xr-x | scripts/training/mert-moses.pl | 4 | ||||
-rwxr-xr-x | scripts/training/train-model.perl | 4 | ||||
-rwxr-xr-x | scripts/training/wrappers/parse-de-berkeley.perl | 8 | ||||
-rwxr-xr-x | scripts/training/wrappers/parse-de-bitpar.perl | 2 | ||||
-rwxr-xr-x | scripts/training/zmert-moses.pl | 4 |
12 files changed, 26 insertions, 26 deletions
diff --git a/scripts/analysis/weight-scan.pl b/scripts/analysis/weight-scan.pl index 0ed4dbe09..6789c4d6d 100755 --- a/scripts/analysis/weight-scan.pl +++ b/scripts/analysis/weight-scan.pl @@ -8,10 +8,10 @@ use strict; use warnings; use Getopt::Long; -use FindBin qw($Bin); +use FindBin qw($RealBin); use File::Basename; use File::Path; -my $SCRIPTS_ROOTDIR = $Bin; +my $SCRIPTS_ROOTDIR = $RealBin; $SCRIPTS_ROOTDIR =~ s/\/training$//; $SCRIPTS_ROOTDIR = $ENV{"SCRIPTS_ROOTDIR"} if defined($ENV{"SCRIPTS_ROOTDIR"}); diff --git a/scripts/ems/experiment.perl b/scripts/ems/experiment.perl index d105394a6..0f6d93d8b 100755 --- a/scripts/ems/experiment.perl +++ b/scripts/ems/experiment.perl @@ -4,14 +4,14 @@ use strict; use Getopt::Long "GetOptions"; -use FindBin qw($Bin); +use FindBin qw($RealBin); my $host = `hostname`; chop($host); print STDERR "STARTING UP AS PROCESS $$ ON $host AT ".`date`; my ($CONFIG_FILE,$EXECUTE,$NO_GRAPH,$CONTINUE,$VERBOSE,$IGNORE_TIME); my $SLEEP = 2; -my $META = "$Bin/experiment.meta"; +my $META = "$RealBin/experiment.meta"; # check if it is run on a multi-core machine # set number of maximal concurrently active processes @@ -156,7 +156,7 @@ sub detect_machine { sub detect_if_cluster { my $hostname = `hostname`; chop($hostname); - foreach my $line (`cat $Bin/experiment.machines`) { + foreach my $line (`cat $RealBin/experiment.machines`) { next unless $line =~ /^cluster: (.+)$/; if (&detect_machine($hostname,$1)) { $CLUSTER = 1; @@ -167,7 +167,7 @@ sub detect_if_cluster { sub detect_if_multicore { my $hostname = `hostname`; chop($hostname); - foreach my $line (`cat $Bin/experiment.machines`) { + foreach my $line (`cat $RealBin/experiment.machines`) { next unless $line =~ /^multicore-(\d+): (.+)$/; my ($cores,$list) = ($1,$2); if (&detect_machine($hostname,$list)) { diff --git a/scripts/ems/support/split-sentences.perl b/scripts/ems/support/split-sentences.perl index eb03d25a8..dcf031d43 100755 --- a/scripts/ems/support/split-sentences.perl +++ b/scripts/ems/support/split-sentences.perl @@ -6,10 +6,10 @@ binmode(STDIN, ":utf8"); binmode(STDOUT, ":utf8"); binmode(STDERR, ":utf8"); -use FindBin qw($Bin); +use FindBin qw($RealBin); use strict; -my $mydir = "$Bin/nonbreaking_prefixes"; +my $mydir = "$RealBin/nonbreaking_prefixes"; my %NONBREAKING_PREFIX = (); my $language = "en"; diff --git a/scripts/generic/trainlm-irst.perl b/scripts/generic/trainlm-irst.perl index 71f6e08cf..1cf0efad3 100755 --- a/scripts/generic/trainlm-irst.perl +++ b/scripts/generic/trainlm-irst.perl @@ -12,7 +12,7 @@ # And make sure the $settings variable is empty. This script doesn't understand some of the sri args like -unk and will complain. use strict; -use FindBin qw($Bin); +use FindBin qw($RealBin); use Getopt::Long; my $order = 3; diff --git a/scripts/tokenizer/tokenizer.perl b/scripts/tokenizer/tokenizer.perl index 6e7651542..08cfe7dad 100755 --- a/scripts/tokenizer/tokenizer.perl +++ b/scripts/tokenizer/tokenizer.perl @@ -7,11 +7,11 @@ binmode(STDIN, ":utf8"); binmode(STDOUT, ":utf8"); -use FindBin qw($Bin); +use FindBin qw($RealBin); use strict; #use Time::HiRes; -my $mydir = "$Bin/nonbreaking_prefixes"; +my $mydir = "$RealBin/nonbreaking_prefixes"; my %NONBREAKING_PREFIX = (); my $language = "en"; diff --git a/scripts/training/filter-model-given-input.pl b/scripts/training/filter-model-given-input.pl index 064d994dc..2f1b28852 100755 --- a/scripts/training/filter-model-given-input.pl +++ b/scripts/training/filter-model-given-input.pl @@ -10,14 +10,14 @@ use strict; -use FindBin qw($Bin); +use FindBin qw($RealBin); use Getopt::Long; my $SCRIPTS_ROOTDIR; if (defined($ENV{"SCRIPTS_ROOTDIR"})) { $SCRIPTS_ROOTDIR = $ENV{"SCRIPTS_ROOTDIR"}; } else { - $SCRIPTS_ROOTDIR = $Bin; + $SCRIPTS_ROOTDIR = $RealBin; if ($SCRIPTS_ROOTDIR eq '') { $SCRIPTS_ROOTDIR = dirname(__FILE__); } diff --git a/scripts/training/mert-moses-multi.pl b/scripts/training/mert-moses-multi.pl index 22b8ed3fc..cd18f5bb5 100755 --- a/scripts/training/mert-moses-multi.pl +++ b/scripts/training/mert-moses-multi.pl @@ -47,10 +47,10 @@ # 13 Oct 2004 Use alternative decoders (DWC) # Original version by Philipp Koehn -use FindBin qw($Bin); +use FindBin qw($RealBin); use File::Basename; use File::Path; -my $SCRIPTS_ROOTDIR = $Bin; +my $SCRIPTS_ROOTDIR = $RealBin; $SCRIPTS_ROOTDIR =~ s/\/training$//; $SCRIPTS_ROOTDIR = $ENV{"SCRIPTS_ROOTDIR"} if defined($ENV{"SCRIPTS_ROOTDIR"}); diff --git a/scripts/training/mert-moses.pl b/scripts/training/mert-moses.pl index 168286e9f..4aa0f3f49 100755 --- a/scripts/training/mert-moses.pl +++ b/scripts/training/mert-moses.pl @@ -48,13 +48,13 @@ # Original version by Philipp Koehn use strict; -use FindBin qw($Bin); +use FindBin qw($RealBin); use File::Basename; use File::Path; use File::Spec; use Cwd; -my $SCRIPTS_ROOTDIR = $Bin; +my $SCRIPTS_ROOTDIR = $RealBin; $SCRIPTS_ROOTDIR =~ s/\/training$//; $SCRIPTS_ROOTDIR = $ENV{"SCRIPTS_ROOTDIR"} if defined($ENV{"SCRIPTS_ROOTDIR"}); diff --git a/scripts/training/train-model.perl b/scripts/training/train-model.perl index 05b463764..1288e1156 100755 --- a/scripts/training/train-model.perl +++ b/scripts/training/train-model.perl @@ -2,7 +2,7 @@ use strict; use Getopt::Long "GetOptions"; -use FindBin qw($Bin); +use FindBin qw($RealBin); use File::Spec::Functions; use File::Spec::Unix; use File::Basename; @@ -13,7 +13,7 @@ use File::Basename; # Train a model from a parallel corpus # ----------------------------------------------------- $ENV{"LC_ALL"} = "C"; -my $SCRIPTS_ROOTDIR = $Bin; +my $SCRIPTS_ROOTDIR = $RealBin; if ($SCRIPTS_ROOTDIR eq '') { $SCRIPTS_ROOTDIR = dirname(__FILE__); } diff --git a/scripts/training/wrappers/parse-de-berkeley.perl b/scripts/training/wrappers/parse-de-berkeley.perl index 6482d11f3..61bda6ee5 100755 --- a/scripts/training/wrappers/parse-de-berkeley.perl +++ b/scripts/training/wrappers/parse-de-berkeley.perl @@ -2,7 +2,7 @@ use strict; use Getopt::Long "GetOptions"; -use FindBin qw($Bin); +use FindBin qw($RealBin); my ($JAR,$GRAMMAR,$SPLIT_HYPHEN,$MARK_SPLIT,$BINARIZE); @@ -19,12 +19,12 @@ die("ERROR: could not find jar file '$JAR'\n") unless -e $JAR; die("ERROR: could not find grammar file '$GRAMMAR'\n") unless -e $GRAMMAR; $BINARIZE = $BINARIZE ? "-binarize" : ""; -$SPLIT_HYPHEN = $SPLIT_HYPHEN ? "| $Bin/syntax-hyphen-splitting.perl $BINARIZE" : ""; +$SPLIT_HYPHEN = $SPLIT_HYPHEN ? "| $RealBin/syntax-hyphen-splitting.perl $BINARIZE" : ""; $SPLIT_HYPHEN .= " -mark-split" if $SPLIT_HYPHEN && $MARK_SPLIT; my $tmp = "/tmp/parse-de-berkeley.$$"; -open(TMP,"| $Bin/../../tokenizer/deescape-special-chars.perl > $tmp"); +open(TMP,"| $RealBin/../../tokenizer/deescape-special-chars.perl > $tmp"); while(<STDIN>) { # unsplit hyphens s/ \@-\@ /-/g if $SPLIT_HYPHEN; @@ -37,7 +37,7 @@ while(<STDIN>) { } close(TMP); -my $cmd = "cat $tmp | java -Xmx10000m -Xms10000m -Dfile.encoding=UTF8 -jar $JAR -gr $GRAMMAR -maxLength 1000 $BINARIZE | $Bin/berkeleyparsed2mosesxml.perl $SPLIT_HYPHEN"; +my $cmd = "cat $tmp | java -Xmx10000m -Xms10000m -Dfile.encoding=UTF8 -jar $JAR -gr $GRAMMAR -maxLength 1000 $BINARIZE | $RealBin/berkeleyparsed2mosesxml.perl $SPLIT_HYPHEN"; print STDERR $cmd."\n"; open(PARSE,"$cmd|"); diff --git a/scripts/training/wrappers/parse-de-bitpar.perl b/scripts/training/wrappers/parse-de-bitpar.perl index 50da7fd22..bbcccf877 100755 --- a/scripts/training/wrappers/parse-de-bitpar.perl +++ b/scripts/training/wrappers/parse-de-bitpar.perl @@ -2,7 +2,7 @@ use strict; use Getopt::Long "GetOptions"; -use FindBin qw($Bin); +use FindBin qw($RealBin); use File::Basename; use File::Temp qw/tempfile/; diff --git a/scripts/training/zmert-moses.pl b/scripts/training/zmert-moses.pl index 7b8c60f77..ecd783fa2 100755 --- a/scripts/training/zmert-moses.pl +++ b/scripts/training/zmert-moses.pl @@ -12,9 +12,9 @@ # 29 Dec 2009 Derived from mert-moses-new.pl (Kamil Kos) -use FindBin qw($Bin); +use FindBin qw($RealBin); use File::Basename; -my $SCRIPTS_ROOTDIR = $Bin; +my $SCRIPTS_ROOTDIR = $RealBin; $SCRIPTS_ROOTDIR =~ s/\/training$//; $SCRIPTS_ROOTDIR = $ENV{"SCRIPTS_ROOTDIR"} if defined($ENV{"SCRIPTS_ROOTDIR"}); |