Skip to content

Comment on 1000x Faster Spelling Correction: Source Code releasedparent

Comments

I think you mean a trie representing the dictionary plus edit-distance-2 (like the OP's algorithm does). There's no easy way to "skip" characters in a trie.

You can skip characters in a trie, at least towards the right-hand-end of a word, by recursing down every path. I've done so to good (and performant) effect, before.

You wouldn't have to. As described in the article, the dictionary maps from possible entry texts to the corrected terms.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.