Bobafart
08-01-2007, 11:19 PM
I am trying to compare strings.
I have a news item with a Headline and a ~20 word description of the news item.
I pull key words out of the headline and the description and put them in an array.
I then compare the list of key words to a large database of other news items.
I then post the related news items under the initial news article as "Related News Item" links.
---
What I want to do is have an AJAX slider that slides the relevance to increase/decrease the signal to noise ratio.
So if you slide the bar to the right (I already have the slider made .. I just need a way to code the server side PHP) only a few but more accurate related news items are posted, if you slide the bar all the way to the left then many, many related news items are posted but they aren't as accurate.
So I need a way to compare strings with accuracy in mind.
The only way I can think of doing this is:
$compareStrings = similar_text($headlineKeywords, $relatedHeadline, $percentageThreshold );
where $percentageThreshold changes based on the slider value.
Does anyone else know of another way to do this?
I have a news item with a Headline and a ~20 word description of the news item.
I pull key words out of the headline and the description and put them in an array.
I then compare the list of key words to a large database of other news items.
I then post the related news items under the initial news article as "Related News Item" links.
---
What I want to do is have an AJAX slider that slides the relevance to increase/decrease the signal to noise ratio.
So if you slide the bar to the right (I already have the slider made .. I just need a way to code the server side PHP) only a few but more accurate related news items are posted, if you slide the bar all the way to the left then many, many related news items are posted but they aren't as accurate.
So I need a way to compare strings with accuracy in mind.
The only way I can think of doing this is:
$compareStrings = similar_text($headlineKeywords, $relatedHeadline, $percentageThreshold );
where $percentageThreshold changes based on the slider value.
Does anyone else know of another way to do this?