On Thu, Jul 15, 2010 at 11:54, Richard Quadling <rquadl...@gmail.com> wrote:
>
> I'm looking for is a way to compare what they've entered against a
> known list and to provide my 10 best guesses.

    Look into the following functions and families:

        levenshtein()
        similar_text()

    You wouldn't want to use metaphone() or soundex(), because you're
working with alphanumeric combinations, but if you want to be a
glutton for punishment, it could be fun.  Something along the lines of
using levenshtein() to get the best matches, then similar_text() to
score each of the matches would probably be a viable solution for you.
 The last time I incorporated something like that was for my own use
to track down a record in a MySQL database for which I could remember
just a small blip of text.  It looked through about 23 million records
in under two minutes and I found exactly what it was for which I was
searching --- even though I was off by one word.  Would've taken me
forever to find it using alternative methods.

-- 
</Daniel P. Brown>
UNADVERTISED DEDICATED SERVER SPECIALS
SAME-DAY SETUP
Just ask me what we're offering today!
daniel.br...@parasane.net || danbr...@php.net
http://www.parasane.net/ || http://www.pilotpig.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to