https://github.com/divineomega/php-summary
📝 Automatically summarises text, using a naive summarisation algorithm
https://github.com/divineomega/php-summary
php-library summary summerisation-algorithm
Last synced: 3 months ago
JSON representation
📝 Automatically summarises text, using a naive summarisation algorithm
- Host: GitHub
- URL: https://github.com/divineomega/php-summary
- Owner: DivineOmega
- License: lgpl-3.0
- Created: 2015-12-07T21:10:37.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2020-06-24T22:18:47.000Z (over 5 years ago)
- Last Synced: 2025-07-07T14:04:43.415Z (3 months ago)
- Topics: php-library, summary, summerisation-algorithm
- Language: PHP
- Homepage:
- Size: 40 KB
- Stars: 35
- Watchers: 5
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PHP Summary
[](https://travis-ci.org/DivineOmega/php-summary)
[](https://coveralls.io/github/DivineOmega/php-summary?branch=master)
[](https://styleci.io/repos/47579407)
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](http://thetokenizer.com/2013/04/28/build-your-own-summary-tool/).
## Installation
Require this package, with [Composer](https://getcomposer.org/), in the root directory of your project.
```bash
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.
```php
$summary = (new SummaryTool($content))->getSummary();
```