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.


In reply to Re: Re: Smart Comparison of Buffy Strings by hossman
in thread Smart Comparison of Buffy Strings by Cody Pendant

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.