#distance #string #fuzzy-search #sift

sift4

This crate provides the sift4 string distance algorithm. It is very fast and returns results similar to levenshtein

5 releases

0.1.4 Feb 16, 2019
0.1.3 Feb 16, 2019
0.1.2 Jan 18, 2019
0.1.1 Jan 18, 2019
0.1.0 Jan 18, 2019

#2480 in Algorithms


Used in city-spellcheck

MIT license

6KB
89 lines

sift4

Build Status MIT licensed Released API docs

This is a rust implementation of the sift4 string distance algorithm. Sift4 is very fast and unlike sift3 more closely resembles what you would get from the Levenshtein distance algorithm.

The Algorithm

Sift4 distance

Add as dependency

sift4 is available on crates.io.

[dependencies]
sift4 = "0.1.4"

Usage

For now there is only the simple algorithm, which uses a max offset of 5:

extern crate sift4;

let distance = sift4::simple("London", "Londo");
assert_eq!(1, distance);

No runtime deps