Module: Eco::Data::FuzzyMatch::ClassMethods
- Includes:
- ArrayHelpers, CharsPositionScore, NGramsScore, Pairing, StringHelpers
- Included in:
- Eco::Data::FuzzyMatch
- Defined in:
- lib/eco/data/fuzzy_match.rb
Instance Method Summary collapse
Methods included from NGramsScore
#ngrams_score, #words_ngrams_score
Methods included from CharsPositionScore
Methods included from Pairing
Methods included from StringHelpers
#get_words, #no_blanks, #normalize_string, #remove_matching_words, #string_combinations, #string_ngrams, #string_permutations, #word_ngrams
Methods included from ArrayHelpers
#combinations, #facet, #ngrams, #permutations
Instance Method Details
#jaro_winkler(str1, str2, **options) ⇒ Object
26 27 28 29 30 31 32 33 34 35 |
# File 'lib/eco/data/fuzzy_match.rb', line 26 def jaro_winkler(str1, str2, **) return 0 if !str1 || !str2 = { ignore_case: true, weight: 0.25 }.merge() require 'jaro_winkler' JaroWinkler.distance(str1, str2, **) end |