From: Erik Veenstra Date: 2008-07-09T02:03:38+09:00 Subject: Re: String matching/comparing, statistical similarity > Second thing I thought of, maybe there's a way in Ruby to > compare strings and get back a percentage of how similar the > strings are? There's a very fast C-implementation of the Levenshtein distance. This module has two methods, of which one is called normalized_distance. It does exactly what you mentioned: Levenshtein.normalized_distance(s1, s2, threshold=nil) Download and documentation: $ gem install levenshtein http://rubyforge.org/projects/levenshtein/ http://www.erikveen.dds.nl/levenshtein/doc/index.html gegroet, Erik V. - http://www.erikveen.dds.nl/