String metric algorithms for Crystal:
Add this to your application's shard.yml
:
dependencies:
string-metrics:
github: mlobl/string-metrics
require "string-metrics"
StringMetrics.damerau_levenshtein("char", "hcar") == 1
StringMetrics.hamming("Micro", "Macro") == 1
StringMetrics.jaro("MARTHA", "MARHTA").round(2) == 0.94
StringMetrics.jaro_winkler("MARTHA", "MARHTA").round(2) == 0.96
StringMetrics.levenshtein("Car", "Char") == 1
- Fork it ( https://github.com/mlobl/string-metrics/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
- mlobl Meyer Lobl - creator, maintainer