Class: IdentityParade::Matchers::StringMatcher

Inherits:
IdentityParade::Matcher show all
Defined in:
lib/identity_parade/matchers/string_matcher.rb

Overview

This matcher checks the similarity of two strings.

Instance Attribute Summary

Attributes inherited from IdentityParade::Matcher

#left, #right

Instance Method Summary collapse

Methods inherited from IdentityParade::Matcher

#initialize

Constructor Details

This class inherits a constructor from IdentityParade::Matcher

Instance Method Details

#jarowObject



11
12
13
# File 'lib/identity_parade/matchers/string_matcher.rb', line 11

def jarow
  FuzzyStringMatch::JaroWinkler.create(:native)
end

#scoreObject



7
8
9
# File 'lib/identity_parade/matchers/string_matcher.rb', line 7

def score
  jarow.getDistance(left.to_s, right.to_s)
end