strsim 0.1.0

Implementations of string similarity metrics. Currently includes Hamming, Levenshtein, Jaro, and Jaro-Winkler.
docs.rs failed to build strsim-0.1.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: strsim-0.11.1

strsim-rs

Rust implementations of string similarity metrics. Best efforts will be made to stay up-to-date with Rust nightly. Currently includes:

Installation

# Cargo.toml
[dependencies]
strsim = "0.1.0"

Usage

extern crate strsim;

use strsim::{hamming, levenshtein, jaro, jaro_winkler};

fn main() {
    match hamming("hamming", "hammers") {
        Ok(distance) => assert_eq!(3, distance),
        Err(why) => panic!("{:?}", why)
    }
    
    assert_eq!(3, levenshtein("kitten", "sitting"));

    assert!(0.392 - jaro("Friedrich Nietzsche", "Jean-Paul Sartre") < 0.001);
    
    assert!(0.911 - jaro_winkler("cheeseburger", "cheese fries") < 0.001);
}

Todo's

Version

0.1.0

License

MIT