[−][src]Crate trigram
The trigram library computes the similarity of strings, inspired by the similarity function in the Postgresql pg_trgm extension.
Structs
Match | This is the same as regex::Match. |
Matches | Iterator over fuzzy word matches. |
Functions
find_words_iter | Iterates over fuzzy matches of one string against the words in another, such that the similarity is over some threshold, for example 0.3. |
similarity | Returns the similarity of two strings as the Jaccard similarity of their trigram sets. The
returned value is between 0.0 and 1.0, with 1.0 indicating maximum similarity. The input
strings are normalized before comparison, so it is possible to get a score of 1.0 between
different strings. For example |