PHP 4.0 Bug #6562: levenshtein function does not work correctly...
| From: | fboudot at cybercable dot fr | Date: | Tue, 05 Sep 2000 21:10:53 +0000 |
| Subject: | PHP 4.0 Bug #6562: levenshtein function does not work correctly... | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-32246@lists.php.net to get a copy of this message | ||
From: fboudot@cybercable.fr
Operating system: Linux
PHP version: 4.0.1pl2
PHP Bug Type: Other
Bug description: levenshtein function does not work correctly...
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