Text similarity

From: Date: Mon, 28 Sep 2009 10:27:43 +0000
Subject: Text similarity
Groups: php.general 
Request: Send a blank email to php-general+get-298381@lists.php.net to get a copy of this message
Hi there, I am trying to find out similarity between 2 strings. Somehow the similar_text function returns 33% similarity on strings that are not even close and on the other hand it returns 21% on strings that have a matching word. E.G: 'gemütliche sofas' Wohngemeinschaften - similarity: 33.333333333333 Sofas & Sessel - similarity: 31.25 I am using this code: similar_text($data[txt], $categories[$i], $similarity); Does anybody have an idea why it gives back 33% similarity on the first string? Thank you for any help, Merlin

« previous php.general (#298381) next »