Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I wonder if n-grams could solve this automatically?

If we consider the actual words to be a latent variable, then we can use an n-gram model to compute the maximum likelihood estimate (sorry Bayesians) using dynamic programming.

There is also the Bayesian approach where you treat it as a Bayesian network and use belief propagation to compute the marginal posteriors over each letter.

EDIT: took a while to figure out the ML approach.



Yes, that's what I did: https://github.com/wiseman/finalletters

It uses a bigram model and Viterbi decoding. With the right corpora (the repo includes the King James Bible and some Lutheran hymnals, as the woman was reportedly Lutheran) it's easy to decode "OFWAIHHBTN" into "our father who are in heaven hallowed be thy name".




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: