From: Josh Berkus <josh@agliodbs.com>
To: pgsql-sql@postgresql.org
Subject: Name Alike Challenge
Date: Tue, 07 Aug 2001 11:33:48 -0700
Message-ID: <web-98154@davinci.ethosmedia.com> (raw)
Folks,
The "Name Alike" PL/pgSQL function has been posted on Roberto Mello's
cookbook:
http://www.brasileiro.net/postgres/cookbook/view-one-recipe.adp?recipe_id=967
This function requires Joe Conway's port of the Metaphone and
Levenshtein functions to PostgreSQL, available from /contrib on CVS as
well as another site where /contrib stuff is available (anyone know
where this is?). Thanks again, Joe!
The purpose of the function is to take two First/Last name sets, and
depending on the desired degree of "fuzzyness" return whether they are
similar or not. I constructed this function with two purposes in mind:
preventing duplicates by checking for similar names before accepting
INSERTS, and de-duplicating large, messy lists from external souces
(such as box office lists).
Now, the challenge:
1. Aside from stripping the annoying copyright comments, can anyone name
a way in which this function could be made more efficient without
changing its results?
2. Can anyone come up with roman-alphabet names which will "defeat" the
function? I.e. can you think of similar-typoed names that can't be
detected as similar, or patently different names that come up as
identical?
3. Can anyone turn this function on its head, and rather than having it
accept 2 first/last names and a looseness factor and return TRUE/FALSE,
have it accept the two name pairs and return a looseness factor?
Go for it!
-Josh Berkus
______AGLIO DATABASE SOLUTIONS___________________________
Josh Berkus
Complete information technology josh@agliodbs.com
and data management solutions (415) 565-7293
for law firms, small businesses fax 621-2533
and non-profit organizations. San Francisco
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: josh@agliodbs.com
Subject: Re: Name Alike Challenge
In-Reply-To: <web-98154@davinci.ethosmedia.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox