phpmine Posted June 29, 2008 Share Posted June 29, 2008 Hello you freaks! I am looking to make an automatic meta keyword generator based on an array of phrases. It is more my site that is under construction, http://www.phpmine.com. Go to the "Q and A" section and you'll see a series of questions there, five in total. right now the system simply grabs all the words there, filters though common words, and then spits out the words as keywords. I would like some advice on how to set it up in this way: puts all the words in an array and counts their frequency creates an array of two words phrases and counts their frequency does the same for 3 word phrases spits out the top 25 keywords from the array generated maybe someone has already cokked up this nasty script. thanks in advance guys! Link to comment https://forums.phpfreaks.com/topic/112459-meta-keyword-generator/ Share on other sites More sharing options...
DarkWater Posted June 29, 2008 Share Posted June 29, 2008 I can't really write this for you right now (I'm at a conference), but you'd use array_count_values to get the frequencies, and the rest is pretty easy. Link to comment https://forums.phpfreaks.com/topic/112459-meta-keyword-generator/#findComment-577406 Share on other sites More sharing options...
phpmine Posted June 29, 2008 Author Share Posted June 29, 2008 WOW! that was a fast reply! love the community already. yeah i did that for the frequency of the words, but how do i build an array of all the 2 word phrases found? the logic of the scripts does not hit me right away. Link to comment https://forums.phpfreaks.com/topic/112459-meta-keyword-generator/#findComment-577412 Share on other sites More sharing options...
DarkWater Posted June 29, 2008 Share Posted June 29, 2008 Define "two word phrases". Like, just groupings of any two words, i.e: You have: "The sky is quite blue today."; You want: "The sky" "sky is" "is quite" "quite blue" "blue today" Right? Link to comment https://forums.phpfreaks.com/topic/112459-meta-keyword-generator/#findComment-577414 Share on other sites More sharing options...
phpmine Posted June 29, 2008 Author Share Posted June 29, 2008 right! then i would count their frequency. Link to comment https://forums.phpfreaks.com/topic/112459-meta-keyword-generator/#findComment-577421 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.