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

trunk: fixing bugs introduced by the <s> and </s> symbols in words.txt

git-svn-id: https://svn.code.sf.net/p/kaldi/code/trunk@4670 5e6a8d80-dfce-4ca6-a32a-6e07a63d50c8
parent 081a3036
No related branches found
No related tags found
No related merge requests found
......@@ -507,9 +507,10 @@ if (-s "$lang/phones/word_boundary.int") {
$wordseq = "";
$sid = 0;
foreach (1 .. $wlen) {
$id = int(rand(scalar(%wint2sym)));
while ($wint2sym{$id} =~ m/^#[0-9]*$/ or $id == 0) {
$id = int(rand(scalar(%wint2sym)));
$id = int(rand(scalar(keys %wint2sym)));
while ($wint2sym{$id} =~ m/^#[0-9]*$/ or
$wint2sym{$id} eq "<s>" or $wint2sym{$id} eq "</s>" or $id == 0) {
$id = int(rand(scalar(keys %wint2sym)));
}
$wordseq = $wordseq . "$sid ". ($sid + 1) . " $id $id 0\n";
$sid ++;
......
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