Skip to content

Videles/php-summary

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP Summary

Build Status Coverage Status StyleCI Packagist

A PHP library to automatically summarise text using a naive summerisation algorithm.

This summerisation algorithm in use takes the key sentence from each paragraph. It then strings these resulting sentences together to form the summary.

For more details on this algorithm, see this blog post by Shlomi Babluki.

Installation

Require this package, with Composer, in the root directory of your project.

composer require divineomega/php-summary

Usage

To use PHP Summary, you should create a new SummaryTool object, passing it the text content of your article. You can then call its getSummary method to retrieve the shortened summary of the article.

Note: The article content must have its paragraphs seperated by two new line characters.

$summary = (new SummaryTool($content))->getSummary();

About

📝 Automatically summarises text, using a naive summarisation algorithm

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%