syntax:functions:distance
This is an old revision of the document!
distance(text, text)
The edit distance between two text strings calculated as the Damerau-Levenshtein distance. It shows the number of text edits such as insert or delete are needed to obtain one text string from another. It's used to measure a degree of variance between two strings. The bigger is the edit distance, the more different the strings are.
Example | Result |
---|---|
distance("cat", "cat") | 0 |
distance("cat", "cut") | 1 |
distance("cat", "dog") | 3 |
distance("cat", "Scott") | 3 |
Use cases: fuzzy matching, detection of mistyped words.
syntax/functions/distance.1519914218.txt.gz · Last modified: 2018/03/01 09:23 by dmitry