Details
-
Improvement
-
Status: Patch Available
-
Minor
-
Resolution: Unresolved
-
None
-
None
-
None
-
New
Description
Sometimes when we calculate the Levenshtein distance we don't need the exact distance, we only want to know if the strings are similar enough.
sug.score = sd.getDistance(original, sug.string); if (sug.score < min) continue;
If we use this threshold in the distance calculation, we can speed it up, we can stop the calculation when we already know that the the the distance will be lower than the threshold.