Number of input and output field
| Number of input field |
: |
Two |
| Number of output field |
: |
One |
A similarity measure between two strings. It returns a value in the interval [0.0, 1.0], where 0.0 indicates that the two strings are completely different and 1.0 indicates that they are identical.
This transformation function uses the Levenshtein distance to measure the similarity between two strings. The Levenshtein distance is a string metric that measures the minimum number of single-character edits—insertions, deletions, or substitutions—required to transform one string into another.
For example, the Levenshtein distance between the words “sitting” and “kitten” is 3, since:
- s is substituted with k,
- i is substituted with e, and
- g is deleted.
Based on this distance, a similarity score between the two strings can be derived.
The algorithm’s time complexity is
O(n
2)