How possible? if the algo is wrong so everything must test wrong. Unless … the testing function has wrong expectations!
Wrong probability for word ‘thee’.
Expected: 0.1267.
Got: 0.004476442720185026.
Wrong probability for word ‘esteemed’.
Expected: 0.0016.
Got: 5.595553400231283e-05.
Wrong probability for word ‘your’.
Expected: 0.2096.
Got: 0.007404782332972731.
7 Tests passed
3 Tests failed
ABOUT ‘thee’
counts 240
where corpus is
len(word_l)=53614
so P(‘thee’) must be 0.004 circa