RE: [PHP] Checking for existing records[Scanned]
| From: | Michael Egan | Date: | Mon, 02 Jun 2003 14:26:06 +0000 |
| Subject: | RE: [PHP] Checking for existing records[Scanned] | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-149800@lists.php.net to get a copy of this message | ||
Thanks Daniel.
I think the approach I'll settle for will be to do an initial check to make sure that no record
of exactly the same name exists and then look through the records to see if there are any similar
records using the similar_text() function.
I'll present the records from the second stage to the user to prompt them to see if they really
want to add the record name they have just entered.
If there are any improvements to this I'll be happy to take them on board.
I confess that by far and away my preferred solution would be to get the staff of the section using
the application to put their brains into gear before using it - but I suppose if everybody did this
some of us might be out of a job.
Sorry about the rant but it's been one of those weeks - and it's only Monday!!
Thanks,
Michael Egan
-----Original Message-----
From: Daniel Stark [mailto:dstark@mac.com]
Sent: 02 June 2003 15:11
To: Michael Egan
Cc: PHP General (E-mail)
Subject: Re: [PHP] Checking for existing records[Scanned]
You might also look into word stemming (removing suffixes and possibly
prefixes) and comparing stemmed titles. Another possibility would be to
find a list of commonly misspelled/misused words like (there, their,
they're) and substitute all possibilities with one version for the
purposes of checking the title. Also removing stop words like (the, of,
and) and then comparing titles would be a good method. Hint: lots of
these methods are used in Keyword finding algorithms.
You might also make the process more interactive for your users. If you
find a title through the above methods that seems like a hit present it
to the user and say:
"The following records were already found in the system, please verify
that the record you are adding is unique."
Then let the user indicate whether the record is in fact unique.
hth,
Dan