mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-08-13 20:12:24 +00:00
small fixes
This commit is contained in:
parent
c3c6d4c3c4
commit
c91e7e2fac
@ -107,7 +107,7 @@ def get_score(model: kenlm.Model, history: List[str], word: str):
|
|||||||
Return \log_{10} p(word|history).
|
Return \log_{10} p(word|history).
|
||||||
"""
|
"""
|
||||||
order = model.order
|
order = model.order
|
||||||
history = history[-(order - 1) :] if order > 1 else history
|
history = history[-(order - 1) :]
|
||||||
|
|
||||||
in_state = kenlm.State()
|
in_state = kenlm.State()
|
||||||
out_state = kenlm.State()
|
out_state = kenlm.State()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user