🇻🇪 Venezuela Te Busca: deduplicamos el registro de personas desaparecidas. Ayuda gratuita para reunir familias.Saber más

← All Tools
Free Tool

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

Edit Distance
1
Match

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

Typo correction for transposed characters
Keyboard adjacency error detection
OCR error correction
Fast approximate string matching

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.