4 ms·
It's already been answered why this isn't a good idea, but there is a working approach that works similarly: instead of all words within Levenshtein distance N,
by lorenzhs 11y ago
It's already been answered why this isn't a good idea, but there is a working approach that works similarly: instead of all words within Levenshtein distance N, you store all words with exactly N characters deleted from them. So for each word in your dictionary, store all words that can appear when you delete N characters. That's a much more reasonable number, and there are tricks to make it manageable for long words. Then when you do queries, do the same with your query word and check if it's in the index.
This is actually a very fast technique, it's described here in more detail: http://arxiv.org/pdf/1008.1191v2.pdf http://arxiv.org/pdf/1008.1191v2.pdf