Re:A kinda okay text generator
by karanlyons on Monday October 08, 2018 @04:42AM
(#18165423)
You’re going to want to look at https://en.wikipedia.org/wiki/Kneser–Ney_smoothing for further improvements on an ngram based approach.
[ Parent
| on HN ]
Or even just Stupid Backoff[1]: If you can't find anything of length N, try N-1 but lower the probability by a fixed ratio (0.4).
[1] Page 2, equation 5 of https://www.aclweb.org/anthology/D07-1090.pdf#page=2