"Anagram solver" based on statistics rather than a dictionary/table?

Posted by James M. on Stack Overflow See other posts from Stack Overflow or by James M.
Published on 2010-04-16T06:12:45Z Indexed on 2010/04/16 6:23 UTC
Read the original article Hit count: 274

My problem is conceptually similar to solving anagrams, except I can't just use a dictionary lookup. I am trying to find plausible words rather than real words.

I have created an N-gram model (for now, N=2) based on the letters in a bunch of text. Now, given a random sequence of letters, I would like to permute them into the most likely sequence according to the transition probabilities. I thought I would need the Viterbi algorithm when I started this, but as I look deeper, the Viterbi algorithm optimizes a sequence of hidden random variables based on the observed output. I am trying to optimize the output sequence.

Is there a well-known algorithm for this that I can read about? Or am I on the right track with Viterbi and I'm just not seeing how to apply it?

© Stack Overflow or respective owner

Related posts about markov

Related posts about ngram