3 unstable releases
0.2.1 | Oct 13, 2020 |
---|---|
0.2.0 | Oct 13, 2020 |
0.1.0 | Oct 11, 2020 |
#2663 in Algorithms
149 downloads per month
15KB
75 lines
Gestalt Pattern Matching
This crate provides a single function, gestalt_ratio, which computes the gestalt pattern matching ratio between two strings, based on recursively looking at longest common substrings. The algorithm is described here: https://en.wikipedia.org/wiki/Gestalt_Pattern_Matching , and was originally described by John W. Ratcliff and John A. Obershelp in Dr. Dobbs Journal in 1988.
This metric is intended to show strings which "look similar" as more similar.
This crate was written by Alex Sanchez-Stern
lib.rs
:
Ratcliff-Obershelp String Matching
Ratcliff-Obershelp String Matching, otherwise known as Gestalt Pattern Matching. This crate contains a single function, which computes a similarity score between two strings, based on recursively looking at longest common substrings. The algorithm is described in this wikipedia page: https://en.wikipedia.org/wiki/Gestalt_Pattern_Matching
Unicode Support
As of version 0.2.0 this crate supports unicode strings. Strings are compared using their extended graphemes, as provided by the unicode_segmentation crate.
Dependencies
~355KB