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

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralvations <alvations@gmail.com>2015-04-26 21:37:10 +0300
committeralvations <alvations@gmail.com>2015-04-26 21:37:10 +0300
commit4a68c42b16626e2ee707e93a6453eda51dc807a1 (patch)
treeeca559cd9dffa8bfcbf803a95c7da4f7e8524643 /scripts
parente1fcc8082a29762946b92e1b068551481fc2b743 (diff)
syncing to latest moses version
Diffstat (limited to 'scripts')
-rw-r--r--scripts/training/filter-model-given-input.pl6
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 100644
--- 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";