Was this helpful?
Similarity Functions
This collection of functions can be used to compute the similarity of strings. These functions are used to perform "fuzzy" matches between values, attempting to account for common entry errors or other equivalences.
These functions return a floating point value normalized to the range [0,1] with 0 representing no similarity at all and 1 representing an exact match. Null-valued inputs are considered totally dissimilar to any other string including nulls and will always return 0.
Function Name
Description
Output Type
Parameters
Similarity.contains
Returns 1 if one of the string expressions contains the other; 0 otherwise.
Float
String value
String Value
Similarity.damerauLevenshtein
Returns the Damerau-Levenshtein distance between two string expressions.
Float
String value
String Value
Similarity.exact
Returns 1 if the two string expressions are equivalent; 0 otherwise.
Float
String value
String Value
Similarity.jaro
Returns the Jaro distance between two string expressions.
Float
String value
String Value
Similarity.jaroWinkler
Returns the Jaro-Winkler distance between two string expressions.
Float
String value
String Value
int value
float value
Similarity.levenshtein
Returns the Levenshtein distance between two string expressions.
Float
String value
String Value
Similarity.positionalQgram
Returns the percentage of q-grams in common between two string expressions.
Float
String value
String Value
int value
int value
Similarity.proximity
Returns the adjusted quotient of the numeric values of the string expressions.
Float
String value
String Value
Similarity.qgram
Returns the percentage of q-grams in common between two string expressions.
Float
String value
String Value
int value
Similarity.shorthand
Returns 1 if the two string expressions are shorthand equivalent; 0 otherwise.
Float
String value
String Value
Last modified date: 12/09/2024