⚡ A Lua library for fuzzy search
The library exposes a Lua module with one function:
fuzzy
function takes 2 arguments. The first is the search
input, the second is the list of string to fuzzy match.
returns a list of the matching items sorted by score. Each item includes:
- item:
string
- score:
number
, fuzzy score - indexes:
list<number>
, the matching indexes
Move the libruzy.so
shared library (latest release)
in your project and import it from Lua code.
local fuzzy = require('libruzy').fuzzy
local res = fuzzy('lou', { 'pierre', 'et', 'le', 'loup' })
-- res:
-- { {
-- item = "loup",
-- score = 71,
-- indexes = { 0, 1, 2 }
-- } }
Skim V2
To build for production run
cargo build --release
Mozilla Public License 2.0