Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
huangruizhe authored Jan 3, 2022
1 parent 7577b08 commit 298faab
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions icefall/shared/make_kn_lm.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,10 +243,8 @@ def cal_bow(self):
for u in a_counts_for_hist.word_to_count.keys(): # Should be careful here: what is Z1
sum_z1_f_z += _counts_for_hist.word_to_f[u]

# I assume the following to be true:
# assert sum_z1_f_z <= 1.0
# assert sum_z1_f_a_z <= 1.0
if sum_z1_f_z < 1:
# assert sum_z1_f_a_z < 1
counts_for_hist.word_to_bow[w] = (1.0 - sum_z1_f_a_z) / (1.0 - sum_z1_f_z)
else:
counts_for_hist.word_to_bow[w] = None
Expand Down

0 comments on commit 298faab

Please sign in to comment.