fuzzy string matching library for ruby
gem install fuzzy-string-matchrequire 'fuzzystringmatch'
jarow = FuzzyStringMatch::JaroWinkler.create( :native )
p jarow.getDistance( "jones", "johnson" )require 'fuzzystringmatch'
jarow = FuzzyStringMatch::JaroWinkler.create( :pure )
p jarow.getDistance( "jones", "johnson" )
p jarow.getDistance( "ああ", "あい" )irb(main):001:0> require 'fuzzystringmatch'
require 'fuzzystringmatch'
=> true
irb(main):002:0> jarow = FuzzyStringMatch::JaroWinkler.create( :native )
jarow = FuzzyStringMatch::JaroWinkler.create( :native )
=> #
irb(main):003:0> jarow.getDistance( "al", "al" )
jarow.getDistance( "al", "al" )
=> 1.0
irb(main):004:0> jarow.getDistance( "dixon", "dicksonx" )
jarow.getDistance( "dixon", "dicksonx" )
=> 0.8133333333333332$ rake bench
ruby ./benchmark/vs_amatch.rb
---
--- Each match functions will be called 1Mega times. ---
---
[Amatch]
user system total real
1.160000 0.050000 1.210000 ( 1.218259)
[this Module (pure)]
user system total real
39.940000 0.160000 40.100000 ( 40.542448)
[this Module (native)]
user system total real
0.480000 0.000000 0.480000 ( 0.484187)Using stack allocated memory.Supported JRuby platform
Divided into two gems.
Divided rspec files into several files.
Supported testable gem Please install rubygems-test and "gem test".
Changed gcc compiler's option for RubyInline.
Stoped to use obsolute method of RSpec.
No open issues yet, or sync has not completed.