php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #6562 levenshtein function does not work correctly...
Submitted: 2000-09-05 17:10 UTC Modified: 2000-12-13 18:30 UTC
From: fboudot at cybercable dot fr Assigned: hholzgra (profile)
Status: Closed Package: Strings related
PHP Version: 4.0.1pl2 OS: Linux
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: fboudot at cybercable dot fr
New email:
PHP Version: OS:

 

 [2000-09-05 17:10 UTC] fboudot at cybercable dot 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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-10-06 19:32 UTC] sniper@php.net
I get the same results with 4.0.3RC2.  

--Jani
 [2000-10-30 12:25 UTC] hholzgra@php.net
dup. of  #7368, i had it fixed while on the train on friday

now if i only could find my PCMCIA network card for a checkin ...
 [2000-12-13 18:30 UTC] hholzgra@php.net
fixed in CVS
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 30 14:01:28 2024 UTC