Skip to main content

LEVENSHTEIN

Measures the edit distance (Levenshtein distance) between two text strings

Description

The LEVENSHTEIN() function is used to calculate the Levenshtein distance between two text strings. Levenshtein distance is a metric that quantifies the number of single-character edits (insertions, deletions, substitutions) needed to transform one text into another. It's useful for tasks like fuzzy string matching and spell-checking

Syntax

LEVENSHTEIN(text1, text2)

Output

number

Variables

  1. text1: The first text string for comparison.

  2. text2: The second text string for comparison.

Example

LEVENSHTEIN(`Text1`,`Text2`)

ID

Text1

Text2

LEVENSHTEIN

1

Hello

Hallo

1

2

Example

Sample

2

3

Kitten

Sitting

3

Did this answer your question?