Commit a7b94bcb authored by Dan Povey's avatar Dan Povey
Browse files

trunk: improvement to validate_dict_dir.pl to reject input where last line of...

trunk: improvement to validate_dict_dir.pl to reject input where last line of some files does not end in newline.

git-svn-id: https://svn.code.sf.net/p/kaldi/code/trunk@4233 5e6a8d80-dfce-4ca6-a32a-6e07a63d50c8
parent 1bb0669f
......@@ -272,6 +272,8 @@ steps/train_sat.sh --cmd "$train_cmd" \
) &
# This step is just to demonstrate the train_quick.sh script, in which we
# initialize the GMMs from the old system's GMMs.
steps/train_quick.sh --cmd "$train_cmd" \
4200 40000 data/train_si284 data/lang exp/tri3b_ali_si284 exp/tri4b || exit 1;
......
......@@ -23,7 +23,9 @@ $idx = 1;
$success = 1;
print "--> reading $dict/silence_phones.txt\n";
while(<S>) {
chomp;
if (! s/\n$//) {
die "Last line '$_' of $dict/silence_phones.txt does not end in newline.\n";
}
my @col = split(" ", $_);
foreach(0 .. @col-1) {
my $p = $col[$_];
......@@ -71,7 +73,9 @@ $idx = 1;
$success = 1;
print "--> reading $dict/nonsilence_phones.txt\n";
while(<NS>) {
chomp;
if (! s/\n$//) {
die "Last line '$_' of $dict/nonsilence_phones.txt does not end in newline.\n";
}
my @col = split(" ", $_);
foreach(0 .. @col-1) {
my $p = $col[$_];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment