PHP 4.0 Bug #6562 Updated: levenshtein function does not work correctly...
| From: | Bug Database | Date: | Fri, 06 Oct 2000 23:32:37 +0000 |
| Subject: | PHP 4.0 Bug #6562 Updated: levenshtein function does not work correctly... | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-34414@lists.php.net to get a copy of this message | ||
ID: 6562
Updated by: sniper
Reported By: fboudot@cybercable.fr
Status: Analyzed
Bug Type: *General Issues
Assigned To:
Comments:
I get the same results with 4.0.3RC2.
--Jani
Previous Comments:
---------------------------------------------------------------------------
[2000-09-05 17:10:53] fboudot@cybercable.fr
The problem is very simple : try this for example
levenshtein("debugging","debuging") returns 0 instead of 1
levenshtein("debbbug","debug") returns 1 instead of 2..
etc
and
levenshtein("ddebug","debug") returns 0
etc
but (the exception!)
levenshtein("debugg","debug") returns 1 (coool)
My english is pretty poor so no long description, i think u have understood the core of the problem
:)
I think this is a problem in the source code of the lenvenshtein function (algorithmic) so no need
for other information (i hope so).
Have a nice day !
Francois
---------------------------------------------------------------------------
Full Bug description available at: http://bugs.php.net/?id=6562