diff options
author | Hieu Hoang <hieu@hoang.co.uk> | 2013-04-10 21:41:48 +0400 |
---|---|---|
committer | Hieu Hoang <hieu@hoang.co.uk> | 2013-04-10 21:41:48 +0400 |
commit | 7ba37e0b0f9171a755cc8e249dcef84e8e430aa6 (patch) | |
tree | 2ba9a5a911d980459e06b02e69446235a90e1abf | |
parent | 72f0b82c9629d16a7665af4b4fa3278976212095 (diff) | |
parent | 475688bf6e70934b733b1e3ffb711f997c993ba3 (diff) |
merge
-rwxr-xr-x | tests/misc.extract-parallel-weighted/run.perl | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/misc.extract-parallel-weighted/run.perl b/tests/misc.extract-parallel-weighted/run.perl index 6d7fa27..b9b0485 100755 --- a/tests/misc.extract-parallel-weighted/run.perl +++ b/tests/misc.extract-parallel-weighted/run.perl @@ -21,10 +21,37 @@ my $catCmd = $is_osx?"gunzip -c ":"zcat "; my $splitCmd = $is_osx?"gsplit ":"split "; my $sortCmd = $is_osx?"gsort ":"sort "; +<<<<<<< HEAD my $cmd; $cmd = "$mosesRoot/scripts/generic/extract-parallel.perl 2 $splitCmd $sortCmd $mosesBin/extract $test_dir/$test_name/en $test_dir/$test_name/fr $test_dir/$test_name/align.fr-en $results_dir/extract 7 --GZOutput --InstanceWeights $test_dir/$test_name/weights 2> $results_dir/log"; print STDERR "Executing: $cmd\n"; `$cmd`; system("$catCmd $results_dir/extract.sorted.gz $results_dir/extract.inv.sorted.gz > $results_dir/out"); +======= +my $SPLIT_EXEC = `gsplit --help 2>/dev/null`; +if($SPLIT_EXEC) { + $SPLIT_EXEC = 'gsplit'; +} +else { + $SPLIT_EXEC = 'split'; +} + +my $SORT_EXEC = `gsort --help 2>/dev/null`; +if($SORT_EXEC) { + $SORT_EXEC = 'gsort'; +} +else { + $SORT_EXEC = 'sort'; +} + +my $CAT_EXEC = "gunzip -c "; + +my $cmd; +$cmd = "$mosesRoot/scripts/generic/extract-parallel.perl 2 $SPLIT_EXEC $SORT_EXEC $mosesBin/extract $test_dir/$test_name/en $test_dir/$test_name/fr $test_dir/$test_name/align.fr-en $results_dir/extract 7 --GZOutput --InstanceWeights $test_dir/$test_name/weights 2> $results_dir/log"; +print STDERR "Executing: $cmd\n"; +`$cmd`; + +system("$CAT_EXEC $results_dir/extract.sorted.gz $results_dir/extract.inv.sorted.gz > $results_dir/out"); +>>>>>>> 475688bf6e70934b733b1e3ffb711f997c993ba3 |