lib/hotwater/jaro_ffi.rb
# compute Jaro-Winkler edit distance between 2 strings
#
# setting `long_tolerance = true` increases the probability of a match when the number
# of matched characters is large.  This option allows for a little more
# tolerance when the strings are large.  It is not an appropriate
# test when comparing fixed length fields such as phone and social security numbers.
#
# @param s1 [String] first string
# @param s2 [String] seconds string
# @param long_tolerance [Boolean] add more tolerance when the strings are large. Default `false`
# @return [Float] edit distance between 0.0 and 1.0
compute Jaro-Winkler edit distance between 2 strings
setting `long_tolerance = true` increases the probability of a match when the number
of matched characters is large.  This option allows for a little more
tolerance when the strings are large.  It is not an appropriate
test when comparing fixed length fields such as phone and social security numbers.
compute Jaro - Winkler edit distance between 2 strings setting ` long_tolerance = true ` increases the probability of a match when the number of matched characters is large . This option allows for a little more tolerance when the strings are large . It is not an appropriate test when comparing fixed length fields such as phone and social security numbers .
def jaro_winkler_distance(s1, s2, long_tolerance = false)
    result = C::jaro_winkler_distance(s1, s2, long_tolerance)
    raise("memory allocation error") if result < 0.0
    result
  end
def jaro_winkler_distance ( s1 , s2 , long_tolerance = false ) result = C :: jaro_winkler_distance ( s1 , s2 , long_tolerance ) raise ( "memory allocation error" ) if result < 0.0 result end
compute Jaro-Winkler edit distance between 2 strings
setting `long_tolerance = true` increases the probability of a match when the number
of matched characters is large.
compute Jaro - Winkler edit distance between 2 strings setting ` long_tolerance = true ` increases the probability of a match when the number of matched characters is large .
None
Float
s1
None
s2
None
long_tolerance
add more tolerance when the strings are large. Default `false`
add more tolerance when the strings are large . Default ` false `