j
jaipkg.dev
packages / library / fuzzy-match-jai

fuzzy-match-jai

v1.0.1library

Pure Jai port of the fuzzy match algorithm at https://github.com/philj56/fuzzy-match

MIT · updated 2 months ago

fuzzy-match-jai

Pure Jai port of the fuzzy match algorithm at https://github.com/philj56/fuzzy-match.

Tests and benchmarks are based on datasets from https://github.com/tajmone/fuzzy-search.

The original work and this port are both under the MIT license.

Usage

#import "Fuzzy_Match";

main :: () {
    score := fuzzy_match("Hello there, friend!", "hethe"); // Returns 175 (good positive match)
    score2 := fuzzy_match("Hello there, friend!", "xyz"); // Returns FUZZY_NO_MATCH (no match at all)
}

Installation

Just copy the Fuzzy_Match folder to your modules folder.

Note that you can delete the Fuzzy_Match/bench_datasets folder if you don't want to use the benchmark procedures. The test procedure though doesn't rely on any external files.