note 39076 added to function.metaphone
| From: | mailatspam-offdotiaindooleydotcom at rn2 dot php dot net | Date: | Fri, 16 Jan 2004 05:37:12 +0000 |
| Subject: | note 39076 added to function.metaphone | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-63667@lists.php.net to get a copy of this message | ||
you can use the metaphone function quite effectively with phrases by taking the levenshtein
distances between two metaphone codes, and then taking this as a percentage of the length of the
original metaphone code. thus you can define a percentage error, (say 20%) and accept only matches
that are closer than that. i've found this works quite effectively in a function i am using on
my website where an album name that the user entered is verified against existing album names that
may be similar. this is also an excellent way of people being able to vaguely remember a phrase and
get several suggestions out of the database. so you could type "i stiched nine times" with
an error percentage of, say, 50 and still get 'a stitch in time saves nine' back as a
match.
----
Manual Page -- http://www.php.net/manual/en/function.metaphone.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+39076
Delete -- http://master.php.net/manage/user-notes.php?action=delete+39076&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+39076&report=yes
Search -- http://master.php.net/manage/user-notes.php