anjlab/rubyfish — pull request #1 by gthole (2012-08-07 00:23:19+00:00)
Title: RubyFish Improvements

Hello,
I'm interested in RubyFish and have made a couple changes that I hope you'll consider merging into the main branch.

* Generalize Damerau-Levenshtein distance so that swaps are turned on and off by an option, which makes Levenshtein distance implementation redundant.
* Only keep three rows at a time in Damerau-Levenshtein computation, which yields speed and memory performance improvements, particularly on long strings (> 1000 characters).
* Add case sensitivity option feature:

ruby-1.9.2-p0 > require 'rubyfish'
ruby-1.9.2-p0 > RubyFish::Hamming.distance("abc","ABC")
=> 3
ruby-1.9.2-p0 > RubyFish::Hamming.distance("abc","ABC", :ignore_case => true)
=> 0

* Make the ReadMe a little prettier with markdown.

Please let me know if you have any questions.

Thanks,
Greg