Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
turnstep's suggestion is excelent. There are 2 other modules you may want to check out:
  1. Text::Soundex - good for determining is words sound-alike
  2. Text::Metaphone - better algorithm that Text::Soundex and good for phrases
You didn't say in your question if the "similar data" you're trying to match is strings or not. If it is numeric a simple +- %5 type algorithm would work well for determining similarity. For comparing strings one of the simplest algorithms you can use is ignoring case ("ANOTHER MAN DOWN" and "Antoher Man Down" are considered the same thing). Its not very powerful but it is very easy to do.

Different algorithms may work better depending on exactly what piece(s) of data you want to de-duplicate on. If you're deduplicating on multiple fields some sort of hybrid de-duplication algorithm may be best. Here's an example deduplication scheme I cooked up for a database of people, where they live, and what their income is:

(String::Approx of LAST_NAME the same) and (INCOME within %5) and (STATE the same)
In my experience coming up with a de-duplication scheme for user-entered data is easy. Coming up with a good one is hard and may take weeks or months of tuning.

In reply to Re: Fuzzy searching by lhoward
in thread Fuzzy searching by jaxz

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



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (2)
As of 2024-04-20 06:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found