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.
#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)
}
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.