small fixes

This commit is contained in:
Fangjun Kuang 2023-04-10 12:17:02 +08:00
parent c3c6d4c3c4
commit c91e7e2fac

View File

@ -107,7 +107,7 @@ def get_score(model: kenlm.Model, history: List[str], word: str):
Return \log_{10} p(word|history).
"""
order = model.order
history = history[-(order - 1) :] if order > 1 else history
history = history[-(order - 1) :]
in_state = kenlm.State()
out_state = kenlm.State()