lib/phonetics/levenshtein.rb in phonetics-1.5.2 vs lib/phonetics/levenshtein.rb in phonetics-1.5.3
- old
+ new
@@ -13,14 +13,15 @@
# https://hal.archives-ouvertes.fr/hal-01474904/document
module Phonetics
module Levenshtein
extend ::PhoneticsLevenshteinCBinding
- def self.distance(str1, str2)
+ def self.distance(str1, str2, verbose = false)
ensure_is_phonetic!(str1, str2)
internal_phonetic_distance(
Phonetics.as_utf_8_long(str1),
- Phonetics.as_utf_8_long(str2)
+ Phonetics.as_utf_8_long(str2),
+ verbose
)
end
def self.ensure_is_phonetic!(str1, str2)
[str1, str2].each do |string|