#text #ruby #fuzzy #match #string #set #finding

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

#53 in #finding

Download history 26/week @ 2024-02-04 18/week @ 2024-02-11 27/week @ 2024-02-18 15/week @ 2024-02-25 22/week @ 2024-03-03 38/week @ 2024-03-10 9/week @ 2024-03-17 8/week @ 2024-03-24 73/week @ 2024-03-31 8/week @ 2024-04-07 1/week @ 2024-04-14 42/week @ 2024-04-21 21/week @ 2024-04-28 2/week @ 2024-05-05 27/week @ 2024-05-12 52/week @ 2024-05-19

104 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