in reply to Re: Smart Comparison of Buffy Strings
in thread Smart Comparison of Buffy Strings

In the node you cite, the goal was to ensure that two strings are "differnet enough". In this node, the goal is to determine if two nodes are "similar enough"

That's an important distinction.

japhy's solution considers two strings different if their lengths are significantly different. I'm fairly certain that's not what Cody wants. If one quote is a complete subset, or a complete superset of another, with only an few subtle spelling mistakes, it should still be considered "similar enough". I would definitely go with String::Approx and set the 'I' and 'D' modifiers very high to allow a large number of Inserts and Deletes (and of course: the 'i' modifier for case insensativeity). You'll have to really play with the "approximateness percentage" to ensure that it allows enough subtle word spelling differences, but doesn't complain that every quote that uses the word "the" is the same.

And of course: I wouldn't recomend this to flat out reject any quote, just to flag it as a potential duplicate.

  • Comment on Re: Re: Smart Comparison of Buffy Strings