Command: LevenshteinDist
- Updated2024-09-12
- 2 minute(s) read
Command: LevenshteinDist
Command: LevenshteinDist
Specifies the Levenshtein distance which is a value for the difference between two texts.
Input Parameters
![]() |
Specifies a text. |
![]() |
Specifies a text. |
Return Parameters
ReturnValue | The return value is an Integer variable type. |
In information theory, the Levenshtein distance describes a value for the difference regarding the minimum number of insert, delete, or replace operations between two strings, in order to transfer one string into the other string.
For example, to get from Diadem to Dialog Box three replacements and four insert operations are necessary which means the Levenshtein distance is 7:
- "Diadem"
- "Dialem" (replace d with l)
- "Dialom" (replace e with o)
- "Dialog" (replace m with g)
- "Dialog " (insert a blank)
- "Dialog B" (insert B)
- "Dialog Bo" (insert o)
- "Dialog Box" (insert x)
The Levenshtein distance determines the similarity between strings, for example, in the spelling correction or duplicate detection.