WenmuZhou / edit-distance

Levenshtein edit distance in Rust

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

edit-distance

Build Status

Calculate Levenshtein distance between two strings.

The Levenshtein edit distance is a measure for the similarity between two strings. It's helpful for spelling correction, fuzzy completion, type-ahead and similar use cases.

This implementation supports Unicode.

Installation

In Cargo.toml add

[dependencies]
edit-distance = "2.0.0"

Then re-run cargo build. That fetches the dependencies and builds the code.

Usage

extern crate edit_distance;

edit_distance("kitten", "sitting"); // => 3

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

History

2017-07-02 2.0.0
2015-05-01 1.0.0 Release
2015-04-18 0.0.1 Initial upload

Credits

Thanks to @skade for very helpful criticism of my first rust lib.

License

APL 2.0, see LICENSE file.

ezoic increase your site revenue

About

Levenshtein edit distance in Rust

License:Apache License 2.0


Languages

Language:Rust 100.0%