Skip to content

Commit fd6aabb

Browse files
nishchalbdanpovey
authored andcommitted
[scripts] make adjust_unk_graph.sh output const-FST (#3884)
1 parent a4fb201 commit fd6aabb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

egs/wsj/s5/utils/lang/adjust_unk_graph.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@ cp -r $graphdir_in/{disambig_tid.int,num_pdfs,phones,phones.txt,words.txt} $grap
3535
oov_id=`echo $oov_word | utils/sym2int.pl $graphdir_in/words.txt`
3636
[ -z $oov_id ] && echo "adjust_unk_graph.sh: the specified oov symbol $oov_word is out of the vocabulary." && exit 1;
3737
fstprint $graphdir_in/HCLG.fst | awk -v oov=$oov_id -v unk_scale=$unk_scale '{if($4==oov) $5=$5-log(unk_scale);print $0}' | \
38-
fstcompile > $graphdir_out/HCLG.fst || exit 1;
38+
fstcompile | fstconvert --fst_type=const > $graphdir_out/HCLG.fst || exit 1;

0 commit comments

Comments
 (0)