Maybe some one did before. I want to make script which will found in mysql text which more similar. Like fore example i have 1000 text in my database and i need to find which is more similar.
Can any one give idea how i can make this script. Which way is better to server and speed. I will made all in php. Maybe some one have some script
Speed will not really be an issue if the numbers are in the range of "have 1000 text in my database" because 1,000 of anything will get processed very fast. The central issue here is going to be how you define "similar."
Please post two or three examples of your texts and a test case that should be found to be similar to one of the examples. Then we can provide more concrete assistance. The length of the text matters a great deal, so it will be best for us to start from examples. In very short texts, some combinations of soundex(), metaphone(), and sometimes levenshtein() may be the right tools.
umaxim
ASKER
I will just by text.Like if i take "Hi my name is maxym" i need to show up all text where i have "Hi my name is maxym" and for the same staff all text. I think i will split by senteces and then check which text have what sentences.
Marco Gasi
I don't know if I really understand but can you test this?
$sql="SELECT text FROM table HWERE text LIKE "%Hi my name is maxym%";
$res = mysql_query($sql) etc...
Please post two or three examples of your texts and a test case that should be found to be similar to one of the examples. Then we can provide more concrete assistance. The length of the text matters a great deal, so it will be best for us to start from examples. In very short texts, some combinations of soundex(), metaphone(), and sometimes levenshtein() may be the right tools.