Text similarity

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux