difflib on Ruby

867 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 best solutions below

0
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
On

You can take a look at diff-lcs.