note 32854 added to function.soundex
| From: | pee at rack1 dot php dot net | Date: | Mon, 09 Jun 2003 11:12:25 +0000 |
| Subject: | note 32854 added to function.soundex | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-50019@lists.php.net to get a copy of this message | ||
fie at myrealbox dot com-
regarding your soudex syllable request- i think counting vowel clusters in the word will result in
an accurate count of syllables. so no soudex feature is necessary, just count through the chars in
the word, and everytime you run from vowel to consanant, increment the syllable count.
using this logic, this sentence is categorized as follows.
2 1 2 1 1 (3) (0) (4) (0) 2
where (#) marks a word that is incorrectly categorized. i'm sure usiong a little thinking one
could figure out the logic in those cases that would result in an accurate count. counting changes
from vowel to consanant would yield-
(1) 1 2 1 2 1 (4) 1 2
taking the average and then cieling of the two types would fix most of the errors.
----
Manual Page -- http://www.php.net/manual/en/function.soundex.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+32854
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+32854&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+32854&report=yes