tdebatty / java-string-similarity

Implementation of various string similarity and distance algorithms: Levenshtein, Jaro-winkler, n-Gram, Q-Gram, Jaccard index, Longest Common Subsequence edit distance, cosine similarity ...
Other
2.69k stars 413 forks source link

Ngram.distance returns a similarity score #22

Closed laxatives closed 8 years ago

laxatives commented 8 years ago

All of the metrics set a distance of 0 to imply exact string match and 1 to imply distance strings. Ngram.distance is backwards and returns 1 for an exact match and 0 for distant strings.

tdebatty commented 8 years ago

Fixed