This string compare worked great for me. I'm doing this job matching strings to generate foreign keys. i've already done a lot of pattern matching but i'm thinking that to be really careful i should do some sort of similarity comparison. and i remembered this thread. and i followed this link. and there's no way in a 72000 line text file i would have found that Northbank Chardonnay should have been North Bank Chardonnay
thanks Paul andrew On Jul 1, 4:46 pm, [EMAIL PROTECTED] wrote: > On Tue, Jul 01, 2008 at 04:20:28PM +1000, Steve Onnis wrote: > > > Does anyone know of a method where you can calculate either by percentage or > > score or something as to how much a string has changed? > > > For example: > > 1) Hi my name is Steve > > 2) Hi my name is John > > > Only the name has changed to the actual percentage change would be low, like > > 20% > > > Or.... > > > 1) Hi my name is Steve > > 2) The cow jumped over the moon > > > The percentage change would be high, like 100% > > Googling "string similarity" turns up lots of hits, including > a CF function: > > http://www.bradwood.com/string_compare/ > > Doing > <cfset comparison_result = stringSimilarity(string1,string2,10)> > on your examples gives a 76% match. > > Is that what you're after? > > Paul Haddon > Technical Services Manager > Formstar Print Technologies --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "cfaussie" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en -~----------~----~----~----~------~----~------~--~---
