Skip to content
Snippets Groups Projects
Commit cd40d121 authored by Guoguo Chen's avatar Guoguo Chen
Browse files

trunk: adding fix to ignore lines becore /data/ section in Arpa format LM

git-svn-id: https://svn.code.sf.net/p/kaldi/code/trunk@4663 5e6a8d80-dfce-4ca6-a32a-6e07a63d50c8
parent e8d92347
No related branches found
No related tags found
No related merge requests found
......@@ -76,6 +76,10 @@ while (<STDIN>) {
chomp;
my @col = split(" ", $_);
if ($current_order == -1 and ! m/^\\data\\$/) {
next;
}
if (m/^\\data\\$/) {
print STDERR "$0: Processing \"\\data\\\"\n";
print "$_\n";
......@@ -118,7 +122,7 @@ while (<STDIN>) {
print "$prob\t$rest_of_line\n";
} else {
if ($num_oov_lines < $max_oov_warn) {
print STDERR "map_arpa_lm.pl: Warning: OOV line $_\n";
print STDERR "$0: Warning: OOV line $_\n";
}
}
}
......@@ -126,7 +130,8 @@ while (<STDIN>) {
}
if ($num_oov_lines > 0) {
print STDERR "map_arpa_lm.pl: $num_oov_lines lines of the Arpa file contained OOVs and were not printed.\n";
print STDERR "$0: $num_oov_lines lines of the Arpa file contained OOVs and ";
print STDERR "were not printed.\n";
}
close(M);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment