Text
Damerau-Levenshtein distance API
Computes the Damerau-Levenshtein distance, which counts an adjacent transposition (e.g. 'teh'->'the') as a single edit in addition to insert/delete/substitute. Answers 'how far apart are these allowing letter swaps?', 'is this a transposition typo?'.
Price$0.02per request
MethodPOST
Route/v1/text/damerau-levenshtein
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
textdameraulevenshteintranspositionedit-distancefuzzytypostring-distance
API URL
Integration docshttps://x402.hexl.dev/v1/text/damerau-levenshteinExample request
{
"a": "teh",
"b": "the"
}Example response
{
"distance": 1,
"similarity": 0.666667,
"note": "counts adjacent transposition (e.g. 'teh'->'the') as one edit",
"interpretation": "1 edit(s) apart (transpositions allowed)"
}Input schema
{
"type": "object",
"required": [
"a",
"b"
],
"properties": {
"a": {
"type": "string",
"examples": [
"teh"
]
},
"b": {
"type": "string",
"examples": [
"the"
]
}
}
}Output schema
{
"type": "object",
"additionalProperties": true
}