PHPackages                             jord-jd/php-summary - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. jord-jd/php-summary

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

jord-jd/php-summary
===================

PHP Summarization Library

v5.0.1(1mo ago)34118LGPL-3.0-onlyPHPPHP &gt;=7.1CI passing

Since Dec 9Pushed 1mo ago3 watchersCompare

[ Source](https://github.com/Jord-JD/php-summary)[ Packagist](https://packagist.org/packages/jord-jd/php-summary)[ Docs](https://github.com/Jord-JD/php-summary)[ GitHub Sponsors](https://github.com/DivineOmega)[ RSS](/packages/jord-jd-php-summary/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (9)Dependencies (3)Versions (10)Used By (0)

PHP Summary
===========

[](#php-summary)

[![Tests](https://github.com/Jord-JD/php-summary/actions/workflows/tests.yml/badge.svg)](https://github.com/Jord-JD/php-summary/actions/workflows/tests.yml)[![Packagist](https://camo.githubusercontent.com/8ed9d37021bb1984aa92bcdcfcdb1a60cebbceb2f74db0f34fd608da9486d109/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f4a6f72642d4a442f7068702d73756d6d6172792e737667)](https://camo.githubusercontent.com/8ed9d37021bb1984aa92bcdcfcdb1a60cebbceb2f74db0f34fd608da9486d109/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f4a6f72642d4a442f7068702d73756d6d6172792e737667)

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

This summarisation algorithm takes the key sentence from each paragraph. It then strings these resulting sentences together to form the summary. Single-sentence paragraphs and final sentences without punctuation are supported.

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
------------

[](#installation)

Require this package, with [Composer](https://getcomposer.org/), in the root directory of your project.

```
composer require jord-jd/php-summary
```

Usage
-----

[](#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.

Paragraphs may be separated by blank Unix, Windows, or classic Mac lines.

```
use JordJD\PHPSummary\SummaryTool;

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

###  Health Score

50

—

FairBetter than 95% of packages

Maintenance94

Actively maintained with recent releases

Popularity17

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 87.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~484 days

Recently: every ~758 days

Total

9

Last Release

30d ago

Major Versions

v1.1.1 → v2.0.02018-03-26

v2.0.1 → v3.0.02020-06-24

v3.0.0 → v4.0.02026-02-14

v4.0.0 → v5.0.02026-02-14

PHP version history (2 changes)1.0PHP &gt;=5.2.1

v3.0.0PHP &gt;=7.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/c580cdf7c14898fff179cdfc1085892091d5d2f49d917873a12365af9ac77c93?d=identicon)[Jord-JD](/maintainers/Jord-JD)

---

Top Contributors

[![Jord-JD](https://avatars.githubusercontent.com/u/650645?v=4)](https://github.com/Jord-JD "Jord-JD (28 commits)")[![peter279k](https://avatars.githubusercontent.com/u/9021747?v=4)](https://github.com/peter279k "peter279k (4 commits)")

---

Tags

php-librarysummarysummerisation-algorithmphplibrarysummarysummarizationsummarizingsummarization library

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/jord-jd-php-summary/health.svg)

```
[![Health](https://phpackages.com/badges/jord-jd-php-summary/health.svg)](https://phpackages.com/packages/jord-jd-php-summary)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
