Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

weighted matching library 1

Status
Not open for further replies.

dbleyl

Programmer
Mar 26, 2001
117
US
I'm looking for a library or algorithm that returns a 'score' from a search of one string in another, in order to calculate a best match.

Any ideas?

Also, been playing with amatch, but I can't find any documentation for it - it has approximate matching capabilities. Any ideas on that one?
 
I've installed amatch as a RubyGem.
The only documentation I found was the 'amatch.txt.en'
file in the directory of the amatch gem.

This file says that amatch calculates the
Levenstein distance of two strings.
 
I ended up using the Simmetrics and SecondString java libraries , hosted on sourceforge. It would be nice to have something like them available in Ruby.
 
I highly recommend purchasing "The Ruby Way" as this book covers lots of effective examples of how to do a wide variety of tasks in Ruby. Levenstein operations is just one example.
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Sponsor

Back
Top