Reply to Re: Comparing 2 sentences that are almost the same

Your name:

Reply:


Posted by Schraalhans Keukenmeester on 06/14/07 16:42

At Thu, 14 Jun 2007 08:35:23 -0400, FFMG let h(is|er) monkeys type:

>
> Hi,
>
> I am looking for a way to compare 2 short paragraphs that are almost
> the same.
>
> Is there some kind of algorithm that would allow us to compare the two
> and return some kind of likely hood of the text been the same?
>
> I am not talking about synonyms and complex things like that, simply
> sentences that have been changed by one or two words.
>
> Is there anything like that available?
>
> Thanks
>
> FFMG

Check out the soundex() and levenshtein() functions. They might be what
you need. Alternatively split your strings in words in arrays and use
array_intersect() to get an idea of the overlap.

HTH

--
Schraalhans Keukenmeester - schraalhans@the.Spamtrapexample.nl
[Remove the lowercase part of Spamtrap to send me a message]

"strcmp('apples','oranges') < 0"

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация