#fuzzy #search #lightweight #pattern #strsim

simsearch

A simple and lightweight fuzzy search engine that works in memory, searching for similar strings (a pun here)

5 releases

✓ Uses Rust 2018 edition

0.1.4 Apr 16, 2019
0.1.3 Apr 16, 2019
0.1.2 Apr 15, 2019
0.1.1 Apr 15, 2019
0.1.0 Apr 15, 2019

#157 in Algorithms

19 downloads per month

MIT/Apache

15KB
177 lines

simsearch

Build Status crates.io docs.rs

A simple and lightweight fuzzy search engine that works in memory, searching for similar strings (a pun here).

Documentation

Usage

Add the following to your Cargo.toml:

[dependencies]
simsearch = "0.1"

Example

use simsearch::SimSearch;

let mut engine: SimSearch<u32> = SimSearch::new();

engine.insert(1, "Things Fall Apart");
engine.insert(2, "The Old Man and the Sea");
engine.insert(3, "James Joyce");

let results: Vec<u32> = engine.search("thngs");

assert_eq!(results, &[1]);

Also try the interactive demo by:

$ cargo run --release --example books

Contribution

All kinds of contribution are welcomed.

  • Issus. Feel free to open an issue when you find typos, bugs, or have any question.
  • Pull requests. New collection, better implementation, more tests, more documents and typo fixes are all welcomed.

License

Licensed under MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)

Dependencies

~1.5MB
~27K SLoC