Rahul Dev Posted December 10, 2010 Share Posted December 10, 2010 Is there any simple algorithm to summarize web news articles in PHP? Link to comment https://forums.phpfreaks.com/topic/221235-algorithms-to-summarize-web-news-articles/ Share on other sites More sharing options...
MMDE Posted December 10, 2010 Share Posted December 10, 2010 what do you mean by summarize? =o you mean you want to make a short snip of it? how is the news articles stored and how do you access them? Link to comment https://forums.phpfreaks.com/topic/221235-algorithms-to-summarize-web-news-articles/#findComment-1145439 Share on other sites More sharing options...
OOP Posted December 10, 2010 Share Posted December 10, 2010 It would be great if you can give an example or at least elaborate more. Link to comment https://forums.phpfreaks.com/topic/221235-algorithms-to-summarize-web-news-articles/#findComment-1145440 Share on other sites More sharing options...
Rahul Dev Posted December 10, 2010 Author Share Posted December 10, 2010 what do you mean by summarize? =o you mean you want to make a short snip of it? how is the news articles stored and how do you access them? suppose i have already extracted a news article(e.g 300 words) and stored it in my database. Next thing i have to do is summarize that article so that it becomes less than 300 words(say 80 words). to do that i need an algorithm to summarize text that already exist. then implement that algorithm in PHP. I don't need scripts that simply reduces the size of an article but summarizes the articles using artificial intelligence. Link to comment https://forums.phpfreaks.com/topic/221235-algorithms-to-summarize-web-news-articles/#findComment-1145444 Share on other sites More sharing options...
MMDE Posted December 10, 2010 Share Posted December 10, 2010 How would you summarize it? Either you have to cut it... which is easy. ( http://php.net/manual/en/function.substr.php ) or you have to rewrite it yourself. (which would need another column in your db.) If you also want to extract some "header" / "title" of the news, use preg_replace to replace everything after (if the title is the first line for example) the header/title with nothing, and store it as a string which you output as the title. ( http://no2.php.net/manual/en/function.preg-replace.php ) Link to comment https://forums.phpfreaks.com/topic/221235-algorithms-to-summarize-web-news-articles/#findComment-1145449 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.