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

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

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

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

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

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

my $cmd = "$BIN -c $TEXT -n $ORDER -o $LM -unk -sdir $TMP -tdir $TMP";

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