I was wondering if anyone has found an *easy* way to guess at what keywords might be from an article. What I am trying to do is take an article, have php script run, and then guess what keyword(s) are but i don't want it calling google or another source brute forcing' to try and find a keyword. Has anyone done something like this and what sort of algorithm did you use?
what do u mean by : what keywords might be from an article and then guess what keyword(s) are are what ?
Given an article (length irrelevent) which has a title and a body, i am looking for an easy way to figure out the topic(keyword(s)) of the article.
Nice hack commando, this would work but there is probably a more elegant way to do this. Key words are not as useful for this stuff as key phrases are. I would probably search for 2-5 word strings that are popular on the page. From there I would do the same for just the title alone and allow it to count for 3x the amount that key phrases in the body. Your title is very important for SEO as it's at the top of the page and in the browser ( <h1> & <title> )tags). This tool would be very useful for many reasons, I'll watch the thread to keep tabs of this.
Well break it back out and add a little of this $submitted_page = file_get_contents($_GET['url']); // get title preg_match ("/\<title\>([^`]*?)\<\/title\>/", $submitted_page, $temp); $title = ereg_replace("[^A-Za-z0-9 ?!.,-]", "", str_replace("<title>", "", str_replace("</title>", "", $temp[0]))); $title = $title . " " . $title . " " . $title ; PHP: and feed the script the $title 1st. This way it gives 3x more value to the title than the body. If you want to further this I know I have a script laying around somewhere that does this for phrases & not just words. Now where did I put that .........