No description
Find a file
2021-01-11 10:16:05 +01:00
.github/workflows nim req lowered to 1.2.8 2020-12-30 23:40:39 +01:00
src small cleanup in fuzzy 2020-12-30 23:34:38 +01:00
tests Initial working version 2020-12-30 17:17:36 +01:00
fuzzy.nimble nim req lowered to 1.2.8 2020-12-30 23:40:39 +01:00
LICENSE.txt Initial working version 2020-12-30 17:17:36 +01:00
README.md Small doc update 2021-01-11 10:16:05 +01:00

Fuzzy search library for nim

There are two important methods fuzzyMatch and fuzzyMatchSmart.

the usage is really straight forward:

var s1 = "foo bar baz"
var s2 = "bAz"
var s3 = "fobz"
var s4 = "bra"

echo fuzzyMatchSmart(s1, s2)  # => 1.0
echo fuzzyMatchSmart(s1, s3)  # => 0.5
echo fuzzyMatchSmart(s1, s4)  # => 0.6

`fuzzyMatchSmart` tries to be smart about the strings so it does:
- lowercase whole string
- sorts substrings splitted by `" "`
- best matching substring of the length of the shorter one