From: "David A. Black" Date: 2008-04-30T11:17:08+09:00 Subject: Re: Levenshtein_distance and recreate the string Hi -- On Wed, 30 Apr 2008, Phillip Gawlowski wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > David A. Black wrote: > | > | But isn't it the same for RUBY -> RUBE and RUBA -> RUBE ? In which > | case, if you had RUBE and the L. distance, you could not recreate > | RUBY; you'd have a whole set of strings that were exactly that > | distance from RUBE. > > Good point. I don't know if the L. distance is unique for each > possibility or not. > > Considering how the algorithm looks, the solutions probably aren't unique. > > But then again, you can use weighted probabilities to achieve the > correct result, I guess. > > N.B.: I'm a bit out of my depth here, having no comp.sci. background > (which I regret..). Me too. I leapt on this thread partly to give myself an excuse to get a more than anecdotal acquaintance with the algorithm. I can't claim that it's *much* more than that, but every little bit helps :-) David -- Rails training from David A. Black and Ruby Power and Light: INTRO TO RAILS June 9-12 Berlin ADVANCING WITH RAILS June 16-19 Berlin INTRO TO RAILS June 24-27 London (Skills Matter) See http://www.rubypal.com for details and updates!