mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-08-09 01:52:41 +00:00
fixed the mistake
This commit is contained in:
parent
82c8fac6ee
commit
7577b08bed
@ -243,7 +243,10 @@ class NgramCounts:
|
||||
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]
|
||||
|
||||
if 1.0 - sum_z1_f_z == 0:
|
||||
# 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:
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user