Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Match word letter by letter
#2
Macro LevenshteinDistance help
Code:
Copy      Help
;Computes <link "https://en.wikipedia.org/wiki/Levenshtein_distance">Levenshtein Distance</link> between two strings.
;Also known as fuzzy matching, fuzzy searching, approximate matching.
;Compares two strings and returns 0 if equal, 1 if almost equal, and so on.
;Uses C# code from <link>https://www.dotnetperls.com/levenshtein</link>

;EXAMPLES

#compile "__LevenshteinDistance"
LevenshteinDistance x.Init

;example 1
out x.x.Compute("keyboard" "keyboarf") ;;1

;example 2
str s1="kitten"
str s2="SITTING"
s1.lcase
s2.lcase
int n=x.x.Compute(s1 s2)
out n ;;3


Attached Files
.qml   LevenshteinDistance.qml (Size: 6 KB / Downloads: 323)


Messages In This Thread
Match word letter by letter - by Imagez - 01-19-2018, 02:16 PM
RE: Match word letter by letter - by Gintaras - 01-19-2018, 04:29 PM

Forum Jump:


Users browsing this thread: 3 Guest(s)