#47443 [Fbk->Opn]: metaphone('scratch') returns wrong result
| From: | sirokai at gmail dot com | Date: | Wed, 18 Feb 2009 21:29:16 +0000 |
| Subject: | #47443 [Fbk->Opn]: metaphone('scratch') returns wrong result | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-133981@lists.php.net to get a copy of this message | ||
ID: 47443
User updated by: sirokai at gmail dot com
Reported By: sirokai at gmail dot com
-Status: Feedback
+Status: Open
Bug Type: Strings related
Operating System: CentOS 5.2
PHP Version: 5.2CVS-2009-02-18 (CVS)
New Comment:
http://code.google.com/p/yeti-witch/source/browse/trunk/lib/metaphone.js
Line 227
Previous Comments:
------------------------------------------------------------------------
[2009-02-18 21:18:19] jani@php.net
Exactly what algorithm does your JS func use?
------------------------------------------------------------------------
[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