Check if a text is present in a bigger text with an error tolerance

This piece might be helpful:

If the contained text is a single word, split the big text at blanks to get a list of words, and calculate the minimum Levenshtein distance of that list of words against the contained text.

Compare the minimum Levenshtein distance against the tolerance.

If the contained text is not a single word, sweep the contained text against the big text letter by letter using the segment() block, seeking a minimum Levenshtein distance.

2 Likes