mirror of
https://gitee.com/openharmony/third_party_rust_strsim-rs
synced 2024-11-27 01:40:41 +00:00
Release 0.8.0
This commit is contained in:
parent
ab17c1e9ab
commit
e777b61bc2
@ -3,9 +3,13 @@ This project attempts to adhere to [Semantic Versioning](http://semver.org).
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [0.8.0] - (2018-08-19)
|
||||
### Added
|
||||
- Normalized versions of Levenshtein and Damerau-Levenshtein (thanks [@gentoid](https://github.com/gentoid))
|
||||
|
||||
## [0.7.0] - (2018-01-17)
|
||||
### Changed
|
||||
- Faster Levenshtein implementation (thanks @wdv4758h)
|
||||
- Faster Levenshtein implementation (thanks [@wdv4758h](https://github.com/wdv4758h))
|
||||
|
||||
### Removed
|
||||
- Remove the "against_vec" functions. They are one-liners now, so they don't
|
||||
@ -96,7 +100,8 @@ vector of results (thanks @ovarene)
|
||||
### Added
|
||||
- Implement Hamming, Jaro, Jaro-Winkler, and Levenshtein
|
||||
|
||||
[Unreleased]: https://github.com/dguo/strsim-rs/compare/0.7.0...HEAD
|
||||
[Unreleased]: https://github.com/dguo/strsim-rs/compare/0.8.0...HEAD
|
||||
[0.8.0]: https://github.com/dguo/strsim-rs/compare/0.7.0...0.8.0
|
||||
[0.7.0]: https://github.com/dguo/strsim-rs/compare/0.6.0...0.7.0
|
||||
[0.6.0]: https://github.com/dguo/strsim-rs/compare/0.5.2...0.6.0
|
||||
[0.5.2]: https://github.com/dguo/strsim-rs/compare/0.5.1...0.5.2
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "strsim"
|
||||
version = "0.7.0"
|
||||
version = "0.8.0"
|
||||
authors = ["Danny Guo <dannyguo91@gmail.com>"]
|
||||
description = """
|
||||
Implementations of string similarity metrics.
|
||||
|
@ -11,7 +11,7 @@
|
||||
```toml
|
||||
# Cargo.toml
|
||||
[dependencies]
|
||||
strsim = "0.7.0"
|
||||
strsim = "0.8.0"
|
||||
```
|
||||
|
||||
### [Documentation](https://docs.rs/strsim/)
|
||||
@ -23,8 +23,9 @@ version in the
|
||||
```rust
|
||||
extern crate strsim;
|
||||
|
||||
use strsim::{hamming, levenshtein, normalized_levenshtein, osa_distance, damerau_levenshtein,
|
||||
normalized_damerau_levenshtein, jaro, jaro_winkler};
|
||||
use strsim::{hamming, levenshtein, normalized_levenshtein, osa_distance,
|
||||
damerau_levenshtein, normalized_damerau_levenshtein, jaro,
|
||||
jaro_winkler};
|
||||
|
||||
fn main() {
|
||||
match hamming("hamming", "hammers") {
|
||||
|
@ -171,7 +171,8 @@ pub fn levenshtein(a: &str, b: &str) -> usize {
|
||||
result
|
||||
}
|
||||
|
||||
/// Calculates normalized score of the Levenshtein algorithm
|
||||
/// Calculates a normalized score of the Levenshtein algorithm between 0.0 and
|
||||
/// 1.0 (inclusive), where 1.0 means the strings are the same.
|
||||
///
|
||||
/// ```
|
||||
/// use strsim::normalized_levenshtein;
|
||||
@ -313,7 +314,8 @@ pub fn damerau_levenshtein(a: &str, b: &str) -> usize {
|
||||
distances[a_len + 1][b_len + 1]
|
||||
}
|
||||
|
||||
/// Calculates normalized score of the Damerau–Levenshtein algorithm
|
||||
/// Calculates a normalized score of the Damerau–Levenshtein algorithm between
|
||||
/// 0.0 and 1.0 (inclusive), where 1.0 means the strings are the same.
|
||||
///
|
||||
/// ```
|
||||
/// use strsim::normalized_damerau_levenshtein;
|
||||
|
Loading…
Reference in New Issue
Block a user