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 -~----------~----~----~----~------~----~------~--~---
