This library is a work in progress.
The fastest Fuzzy Matcher in the wild west. FFI-based.
Find a needle in a haystack based on string similarity and regular expression rules.
Just pass an array of strings to the matcher and it will return the best match(es) for the given needle.
require 'fast_fuzzy_matcher'
FuzzyMatcher.find("whl", ["cartwheel", "foobar", "wheel", "baz"])
=> ["cartwheel", "wheel"]
Better documentation is coming soon. For now, please refer to the specs.
To be done.
Approximately 10-60x faster than the fastest Ruby implementation. The difference is more pronounced for longer strings and larger dictionaries.
Detailed documentation is available at rubydoc.
fast_fuzzy_matcher is available as a gem, to install it just install the gem:
gem install fast_fuzzy_matcher
If you're using Bundler, add the gem to Gemfile.
gem 'fast_fuzzy_matcher'
Run bundle install
.
bundle exec rspec spec/
- Fork it ( https://github.com/wowinter13/fast_fuzzy_matcher/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
MIT License. See LICENSE for details.