mosesdecoder/scripts/training/get-lexical.perl
Rico Sennrich 4e2fc82854 new training option -write-lexical-counts
(creates additional files lex.counts.e2f and lex.counts.f2e)
2012-09-06 11:48:54 +02:00

20 lines
365 B
Perl
Executable File

#!/usr/bin/perl
use strict;
use FindBin qw($RealBin);
BEGIN { require "$RealBin/LexicalTranslationModel.pm"; "LexicalTranslationModel"->import; }
if (scalar(@ARGV) < 4) {
print STDERR $0." source target alignments output_prefix"."\n"
} else {
my ($SOURCE,$TARGET,$ALIGNMENT,$OUT) = @ARGV;
&get_lexical($SOURCE,$TARGET,$ALIGNMENT,$OUT,0);
}