diff options
author | alvations <alvations@gmail.com> | 2015-04-26 21:30:15 +0300 |
---|---|---|
committer | alvations <alvations@gmail.com> | 2015-04-26 21:30:15 +0300 |
commit | ec54ea3c4fcdb055661dba1fe3003d6bb1a0bed8 (patch) | |
tree | 5b8590dd3ab65276f00ab447bdfc2908898bf88c /scripts | |
parent | c01b0a6262fbf92e1908ebc31c5f0894c489a2cf (diff) |
put back some of the difference made after RELEASE3.0 and incorporated it with the -threads parameter
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/training/filter-model-given-input.pl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/training/filter-model-given-input.pl b/scripts/training/filter-model-given-input.pl index 84dbbe879..1464fdb73 100755 --- a/scripts/training/filter-model-given-input.pl +++ b/scripts/training/filter-model-given-input.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl # $Id$ # Given a moses.ini file and an input text prepare minimized translation @@ -8,6 +8,7 @@ # changes by Ondrej Bojar # adapted for hierarchical models by Phil Williams +use warnings; use strict; use FindBin qw($RealBin); @@ -406,8 +407,7 @@ for(my $i=0;$i<=$#TABLE;$i++) { # ... phrase translation model elsif ($binarizer =~ /processPhraseTableMin/) { #compact phrase table - ##my $cmd = "$catcmd $mid_file | LC_ALL=C sort -T $tempdir > $mid_file.sorted && $binarizer -in $mid_file.sorted -out $new_file -nscores $TABLE_WEIGHTS[$i] -threads $threads && rm $mid_file.sorted"; - my $cmd = "$binarizer -in <($catcmd $mid_file | LC_ALL=C sort -T $tempdir) -out $new_file -nscores $TABLE_WEIGHTS[$i] -threads $threads -encoding None"; + my $cmd = "$catcmd $mid_file | LC_ALL=C sort -T $tempdir > $mid_file.sorted && $binarizer -in $mid_file.sorted -out $new_file -nscores $TABLE_WEIGHTS[$i] -threads $threads && rm $mid_file.sorted"; safesystem($cmd) or die "Can't binarize"; } elsif ($binarizer =~ /CreateOnDiskPt/) { my $cmd = "$binarizer $mid_file $new_file.bin"; |