apoc.text.distance

Function

apoc.text.distance(text1 String, text2 String) - compares the two given strings using the Levenshtein distance algorithm.

Signature

apoc.text.distance(text1 :: STRING?, text2 :: STRING?) :: (INTEGER?)

Input parameters

Name Type Default

text1

STRING?

null

text2

STRING?

null

Usage Examples

RETURN apoc.text.distance("Levenshtein", "Levenstein") AS output;
Table 1. Results
output

1