OSA Damerau-Levenshtein Distance
Calculate edit distance allowing insertions, deletions, substitutions, and transpositions — catches swapped adjacent characters like "teh" → "the".
Tilores uses OSA Damerau-Levenshtein in production — so you can automate matching with rules you configure.
Try it yourself
How it works
The Optimal String Alignment (OSA) variant of Damerau-Levenshtein distance extends standard Levenshtein by adding transposition as a fourth allowed operation. This means swapping two adjacent characters counts as a single edit rather than two. "teh" and "the" have an OSA distance of 1 (one transposition), but a Levenshtein distance of 2. The OSA variant has one restriction: it does not allow a substring to be edited more than once, which makes it slightly simpler but different from the true Damerau-Levenshtein in rare edge cases.
Use cases in entity resolution
Related tools
Don't implement this yourself
Tilores Studio runs the full matching engine — this algorithm plus configurable rules and real-time entity resolution — locally on your machine. Free, no account, no cloud. Load your own data and see it working in minutes.