Lee McAuley - 2018-05-25 23:52:39
Hello, I really appreciate the work I've seen you and other people contribute to this site. But I have a question: have you checked out your code against the built-in "similar_text" function of PHP? It looks like you went to a lot of trouble and work to recreate it. It's very accurate in the cases I've used it in -- and those were Enterprise-level applications that did not have much tolerance for duplicate entries in some areas.
An example I've used, in order to prevent duplicate registrations by people from the same company is this:
$match = similar_text($item_on_form, $item_on_dbase, $pct);
if (round($pct, 0) > 85) {
// then you've got a duplicate, don't register!
}
My use of 85% is, of course, arbitrary. I could tighten it up to 90% or above if needed to.
Let me know your thoughts, please.
Thanks