ID: 31188 Updated by: [EMAIL PROTECTED] Reported By: travis at dreamsage dot com -Status: Open +Status: Feedback Bug Type: Pspell related Operating System: Windows XP (linux untested) PHP Version: 4.3.9 New Comment:
I bogused you because it sounded like a simple "VB does this right, PHP doesn't", which doesn't really say anything. You're serious, though, so I apologize for the quick bogus. We can't fix this without a lot more information. We need a valid test case to examine a specific fault before we can even move on this. Simply saying "some of these are wrong" doesn't help us at all, and as a result, we can't help you. You gave us some letters that confuse our metaphone, so let's work with that -- do you have a specific word that is metaphoned differently? The implementation, in PHP 5 at least, is based on CPAN's "Text-Metaphone-1.96" by Michael G Schwern according to the source. Thanks again. Previous Comments: ------------------------------------------------------------------------ [2004-12-19 23:37:23] travis at dreamsage dot com I have checked my VB against results from the original Basic version, a C version as well as a commonly used Java version and the PHP version gives different results than any of these. You have a bug here. Please don't ignore this. The metaphone code commonly runs spellchecks for many MANY websites. The code that controls this is only a couple hundred lines long and so it shouldn't take long to fix. Travis ------------------------------------------------------------------------ [2004-12-19 23:00:28] [EMAIL PROTECTED] Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Thank you for your interest in PHP. Perhaps your VB is wrong? We can\'t do anything about this without a lot more information. ------------------------------------------------------------------------ [2004-12-19 22:36:38] travis at dreamsage dot com Description: ------------ Hello and thanks for taking the time to read this. You guys (and gals) are really appriciated. This bug has to do with the metaphone function. This function turns a word into string that represents the sound of the word. I was recently required to write a VB version of this function because none existed and so I translated the original Basic version of this function written around 1990. http://aspell.net/metaphone/metaphone-kuhn.txt I wanted to check my code so I compared about 10,000 words produced by my VB code to the output of PHP and I found 4 bugs in your code. The output of the PHP function does not match what the output of the above algotythm states. 1: Words with GH 2: words with MB. The B is silent at the end of a word "dumb" but not in the middle "camber" 3: words with GN 4 words with CIA Thanks Travis Apple Reproduce code: --------------- . Expected result: ---------------- . Actual result: -------------- . ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=31188&edit=1