#47443 [Opn->Fbk]: metaphone('scratch') returns wrong result
| From: | jani@php.net | Date: | Wed, 18 Feb 2009 21:18:19 +0000 |
| Subject: | #47443 [Opn->Fbk]: metaphone('scratch') returns wrong result | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-133976@lists.php.net to get a copy of this message | ||
ID: 47443
Updated by: jani@php.net
Reported By: sirokai at gmail dot com
-Status: Open
+Status: Feedback
-Bug Type: Unknown/Other Function
+Bug Type: Strings related
Operating System: CentOS 5.2
PHP Version: 5.2CVS-2009-02-18 (CVS)
New Comment:
Exactly what algorithm does your JS func use?
Previous Comments:
------------------------------------------------------------------------
[2009-02-18 21:08:18] sirokai at gmail dot com
Description:
------------
When I run metaphone('scratch'), I get string(5) "SKRTX"
This is wrong. According to the rules posted for metaphone, T before CH
is silent, so the result should be "SKRX". My Javascript metaphone
function gets this right and I need the two to match up!
Reproduce code:
---------------
<?php
echo metaphone("scratch");
?>
Expected result:
----------------
SKRX
Actual result:
--------------
SKRTX
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=47443&edit=1