Improvements in Spell correction model

Some of the improvements in error model,

  1. In the below code snippet, we are iterating over all prefixes. Can we use LevenshteinSearcher style to lookup candidates up to certain edit distance with combination of error model probabilities.
  1. Changes required to support “Phrase based” error probabilities. I have come across this but not sure how this can be fit in current settings.

Thanks a lot !!