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

lmplz-wrapper.perl « support « ems « scripts - github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 0fa676ce88790b867e415adae2d4af2eaa6463cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env perl 

use strict;
use Getopt::Long "GetOptions";

Getopt::Long::config("pass_through");

my ($TEXT,$ORDER,$BIN,$LM);

&GetOptions('text=s' => \$TEXT,
	    'lm=s' => \$LM,
            'bin=s' => \$BIN,
	    'order=i' => \$ORDER);

die("ERROR: specify at least --bin BIN --text CORPUS --lm LM and --order N!")
  unless defined($BIN) && defined($TEXT) && defined($LM) && defined($ORDER);

my $cmd = "$BIN --text $TEXT --order $ORDER --arpa $LM";
$cmd .= " " . join(' ', @ARGV) if scalar(@ARGV);  # Pass remaining args through.

print "exec: $cmd\n";
`$cmd`;