Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this questionIs there a library similar to Python's difflib on Ruby?
Particularly, I need one that has a method similar to difflib.get_close_matches.开发者_JS百科 Any recommendations?
After some research, I suggest using amatch or SimMetrics (with JRuby) and manually implement the get_close_matches method. Both libs offer implementations of many string similarity algorithms.
You can take a look at diff-lcs.
精彩评论