in reply to Re: Smart Comparison of Buffy Strings
in thread Smart Comparison of Buffy Strings
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.
|
---|