5 ms·
> Or if you have a list of 1,000,000 words, then you can use Sift to pare that down to the top 100 closest, then use Levenshtein to get the exact one. You can
by patal 11y ago
> Or if you have a list of 1,000,000 words, then you can use Sift to pare that down to the top 100 closest, then use Levenshtein to get the exact one.
You cannot do that, because, other than performance, Sift gives no guarantees regarding accuracy. The exact one, or rather the closest match, need not be among the 100 closest sift candidates.
- lvh 11y agoOnly if you absolutely, positively, need to find the right answer 100% of the time. In a lot of cases, a heuristic that runs significantly faster, can be perfectly serviceable.