Skip to content

Commit

Permalink
[scripts] Fix build_const_arpa_lm.sh w.r.t. where <s> appears inside …
Browse files Browse the repository at this point in the history
…words (#2745)
  • Loading branch information
ChunChiehChang authored and danpovey committed Oct 1, 2018
1 parent 19a1811 commit 02d462b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions egs/wsj/s5/utils/build_const_arpa_lm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ mkdir -p $new_lang
cp -r $old_lang/* $new_lang

unk=`cat $new_lang/oov.int`
bos=`grep -w "<s>" $new_lang/words.txt | awk '{print $2}'`
eos=`grep "</s>" $new_lang/words.txt | awk '{print $2}'`
bos=`grep "^<s>\s" $new_lang/words.txt | awk '{print $2}'`
eos=`grep "^</s>\s" $new_lang/words.txt | awk '{print $2}'`
if [[ -z $bos || -z $eos ]]; then
echo "$0: <s> and </s> symbols are not in $new_lang/words.txt"
exit 1
Expand Down

0 comments on commit 02d462b

Please sign in to comment.