kenlm icon indicating copy to clipboard operation
kenlm copied to clipboard

Entropy

Open i55code opened this issue 3 years ago • 0 comments

Hi, is there a function call to calculate entropy directly from KenLM? What is the maths formula of model.score ? Is it the log probability or probability?

Is it true that in your code:

entropy(sent) = - model.score(sent) / length(sent) ? perplexity (sent) = 10 ^ (- model.score(sent) / length(sent) )?

Thanks!

i55code avatar Feb 02 '22 20:02 i55code