Distancia de Damerau-Levenshtein
damerau-levenshteinCalcula la distancia OSA (Levenshtein con transposiciones), útil para errores de tipeo. Cuándo: hay que transformar, comparar o medir un texto con exactitud y no por aproximación. No para: calcular la distancia de edición de Levenshtein entre dos cadenas y similitud normalizada (levenshtein-distance). Efectos secundarios: ninguno (solo lectura, sin red, sin estado guardado). Determinista: la misma entrada da la misma salida. Límites: entrada JSON de hasta 64 KB, 1 s por llamada, resultado de hasta 1 MB.
EN: Computes the optimal string alignment distance: Levenshtein plus transposition of adjacent characters, useful for typo matching. When: text has to be transformed, compared or measured exactly instead of approximated. Not for: computing the edit distance (levenshtein-distance). Side effects: none (read-only, no network access, no stored state). Deterministic: the same input gives the same output. Limits: JSON input up to 64 KB, 1 s per call, result up to 1 MB.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| a | Yes | First string (string; required; up to 20000 chars). | |
| b | Yes | Second string (string; required; up to 20000 chars). | |
| case_sensitive | No | Case sensitive (boolean; optional; default true). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| distance | No |