Skip to content

pigmej/fuzzy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Pure nim fuzzy search implementation. Supports substrings etc

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages