#levenshtein #text #ruby #match #fuzzy #string #set

fuzzy_match

A crate for fuzzy finding items in sets, based on the Ruby fuzzy_find gem

3 unstable releases

Uses old Rust 2015

0.2.1 Aug 25, 2018
0.1.1 May 19, 2018
0.1.0 May 19, 2018

#51 in #levenshtein

Download history 76/week @ 2024-07-28 48/week @ 2024-08-04 10/week @ 2024-08-11 44/week @ 2024-08-18 33/week @ 2024-08-25 32/week @ 2024-09-01 48/week @ 2024-09-08 48/week @ 2024-09-15 76/week @ 2024-09-22 63/week @ 2024-09-29 50/week @ 2024-10-06 57/week @ 2024-10-13 57/week @ 2024-10-20 60/week @ 2024-10-27 54/week @ 2024-11-03 67/week @ 2024-11-10

239 downloads per month

ISC license

1MB
293 lines

fuzzy_match Crates.io Docs.rs Build Status

A port of the basic features of the fuzzy_match Ruby gem to Rust.

Usage

To use the default configuration (SorensenDice then Levenshtein to break ties):

use fuzzy_match::fuzzy_match;

let haystack = vec![("rust", 0), ("java", 1), ("lisp", 2)];
assert_eq!(Some(0), fuzzy_match("bust", haystack));

lib.rs:

fuzzy_match

fuzzy_match provides functionality for finding the best match from a set of strings, optionally with items assosciated with each candidate string. This crate is based in large part on the awesome fuzzy_match Ruby gem, but this crate only implements the basic functionality and skips the more advanced functionality for now.

Dependencies