Computes similarity score between 2 strings based on Sørensen–Dice coefficient (http://en.wikipedia.org/wiki/Dice's_coefficient)
Add this line to your application's Gemfile:
gem 'similar_strings'
And then execute:
$ bundle
Or install it yourself as:
$ gem install similar_strings
score = SimilarStrings.score(str1, str2)
Score ranges from 0 to 1.0 with 1.0 being closely matched.
- Fork it
- 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 new Pull Request