Skip to content

Conversation

@jtrmal
Copy link
Contributor

@jtrmal jtrmal commented Feb 8, 2018

@danpovey this is not what we usually do, but I believe the change makes sense to simplify the workflow...
the typical use case the benefit becomes more visible is explicit UNK model:

  utils/lang/make_unk_lm.sh data/local/dict exp/make_unk
  utils/prepare_lang.sh \
    --unk-fst exp/make_unk/unk_fst.txt --phone-symbol-table data/lang/phones.txt \
    data/local/dict "<oov>" data/local/lang_test data/lang_test
  utils/format_lm.sh \
    data/lang_test data/srilm/best_3gram.gz data/local/dict/lexicon.txt data/lang_test

without this change, we'd have to create one intermediary lang directory to stand between prepare_lang and format_lm -- no big deal but maybe this is slightly nicer.


if [ -e $out_dir/phones ]; then
rm -r $out_dir/phones
if [ -e $out_dir ] && [ ! $lang_dir -ef $out_dir ] ; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think people may not know what -ef is, might be nice to explain it.

@jtrmal
Copy link
Contributor Author

jtrmal commented Feb 8, 2018

ok, added explanation (please squash during merge)

@danpovey danpovey merged commit 1f1b108 into kaldi-asr:master Feb 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants