Edit distance measures the difference between two strings by counting the minimum single-character insertions, deletions, or substitutions needed to transform one into the other. It is useful for spelling correction, where smaller distances indicate better candidates. section 2.4.2
A practical autocorrection workflow:
- Compare the misspelled input with dictionary words. section 2.4.2
Memoized spelling suggestions
A recursive Clojure implementation handles empty strings directly and considers insertion, deletion, and substitution. Memoizing it avoids recomputing identical string pairs. For "achive", the best candidates include ["achieve" 1], ["achime" 1], and ["active" 1].





