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
 [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

Add a Patch

Pull Requests

Add a Pull Request

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-2019 The PHP Group
All rights reserved.
Last updated: Mon Sep 23 17:01:26 2019 UTC