#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

#52 in #levenshtein

Download history 35/week @ 2024-08-29 43/week @ 2024-09-05 41/week @ 2024-09-12 76/week @ 2024-09-19 63/week @ 2024-09-26 59/week @ 2024-10-03 49/week @ 2024-10-10 58/week @ 2024-10-17 62/week @ 2024-10-24 44/week @ 2024-10-31 76/week @ 2024-11-07 55/week @ 2024-11-14 62/week @ 2024-11-21 71/week @ 2024-11-28 170/week @ 2024-12-05 109/week @ 2024-12-12

414 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