Sha256: 23676cb73326eb7050ef942b1298cf30c6bc1ee767c7662c55b17e7c269f50e6
Contents?: true
Size: 489 Bytes
Versions: 8
Compression:
Stored size: 489 Bytes
Contents
class FuzzyMatch class Score # be sure to `require 'amatch'` before you use this class class Amatch < Score def dices_coefficient_similar @dices_coefficient_similar ||= if str1 == str2 1.0 elsif str1.length == 1 and str2.length == 1 0.0 else str1.pair_distance_similar str2 end end def levenshtein_similar @levenshtein_similar ||= str1.levenshtein_similar str2 end end end end
Version data entries
8 entries across 8 versions & 2 rubygems