Bug #16672 Updated: Problem in levenshtein

From: Date: Thu, 18 Apr 2002 20:18:55 +0000
Subject: Bug #16672 Updated: Problem in levenshtein
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-5331@lists.php.net to get a copy of this message
ID: 16672 Updated by: sniper@php.net Reported By: manger_dormir@hotmail.com -Status: Duplicate +Status: Closed Bug Type: Strings related Operating System: linux PHP Version: 4.1.2 New Comment: closed then.. Previous Comments: ------------------------------------------------------------------------ [2002-04-18 06:13:53] hholzgra@php.net duplicate of #16473, fixed in CVS ------------------------------------------------------------------------ [2002-04-17 18:32:59] manger_dormir@hotmail.com Hi!! I've got a little problem with the levenshtein function. There is a particular case where the returned value is not correct. I tried it with 4.0.6 and 4.1.2. when the differences are at the beginning, the returned value is one less than what I expected. For example : <? echo "lev = ".levenshtein("kdos", "los");?> prints lev = 1 and <? echo "lev = ".levenshtein("kdos", "ls"); ?> prints lev = 2 whereas in the first case, I expect 2 and in the second, 3. that's it. Thanx!! ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=16672&edit=1

« previous php.bugs (#5331) next »