Jump to content

Algorithms to summarize web news articles


Rahul Dev

Recommended Posts

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
Share on other sites

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.