mosesdecoder/scripts/ems/support/thot-lm-wrapper.perl
Jeroen Vermeulen a25193cc5d Fix a lot of lint, mostly trailing whitespace.
This is lint reported by the new lint-checking functionality in beautify.py.
(We can change to a different lint checker if we have a better one, but it
would probably still flag these same problems.)

Lint checking can help a lot, but only if we get the lint under control.
2015-05-17 20:04:04 +07:00

22 lines
502 B
Perl
Executable File

#!/usr/bin/env perl
use warnings;
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`;