word_distance(string_1, string_2)
Calculates Levenshtein distance between <string_1> and <string_2>.
CREATE OR REPLACE FUNCTION `justfunctions.eu.word_distance`(`string_1` STRING, `string_2` STRING) RETURNS INT64
LANGUAGE js AS r'''return fuzzball.distance(string_1,string_2);''' OPTIONS ( description = '''Calculates Levenshtein distance between <string_1> and <string_2>.''' , library = [ "gs://justfunctions/bigquery-functions/fuzzball.umd.min.js" ] )
Example
SELECT `justfunctions.eu.word_distance`("python", "pithon")
1