Commit 2428cce8 authored by Abdelwahab HEBA's avatar Abdelwahab HEBA

Fix problem of gen pronunciation

parent 5f9e8281
......@@ -93,14 +93,15 @@ fi
if [ $stage -le 2 ]; then
echo "Combining the CMUdict pronunciations with the autogenerated ones ..."
awk 'NR==FNR{a[$1]=1; next} ($1 in a)' $vocab $cmudict_plain |\
cat - $dst_dir/lexicon_autogen.txt | sort >$lexicon_raw_nosil || exit 1
#awk 'NR==FNR{a[$1]=1; next} ($1 in a)' $vocab $cmudict_plain |\
# cat - $dst_dir/lexicon_autogen.txt | sort >$lexicon_raw_nosil || exit 1
cat $cmudict_plain $dst_dir/lexicon_autogen.txt | sort > $lexicon_raw_nosil || exit 1
raw_lex_size=$(cat $lexicon_raw_nosil | awk '{print $1}' | sort -u | wc -l)
vocab_size=$(wc -l <$vocab)
# TODO Fixe problem
[[ "$vocab_size" -eq "$raw_lex_size" ]] || {
echo "Inconsistent lexicon($raw_lex_size) vs vocabulary($vocab_size) size!";
exit 1; }
#[[ "$vocab_size" -eq "$raw_lex_size" ]] || {
# echo "Inconsistent lexicon($raw_lex_size) vs vocabulary($vocab_size) size!";
# exit 1; }
echo "Combined lexicon saved to '$lexicon_raw_nosil'"
fi
......
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