difflib on Ruby

834 views Asked by At

Is there a library similar to Python's difflib on Ruby?

Particularly, I need one that has a method similar to difflib.get_close_matches. Any recommendations?

2

There are 2 answers

0
fjsj On BEST ANSWER

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.

0
kurumi On

You can take a look at diff-lcs.