PHPackages                             ankit20893/summarize-text - 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. ankit20893/summarize-text

ActiveLibrary

ankit20893/summarize-text
=========================

summarizeText (automatic text summarization) for PHP7

65PHPCI failing

Since May 7Pushed 6y ago1 watchersCompare

[ Source](https://github.com/ankit20893/summarizeText)[ Packagist](https://packagist.org/packages/ankit20893/summarize-text)[ RSS](/packages/ankit20893-summarize-text/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

summarizeText
=============

[](#summarizetext)

This source code can summarize a text, article for example to a short paragraph. Before it would start the summarizing it removes the junk words what are defined in the Stopwords namespace. It is possible to extend it with another languages.

Authors, Contributors
---------------------

[](#authors-contributors)

NameGitHub userAnkit Singh@ankit20893Automatic summarization
-----------------------

[](#automatic-summarization)

> Automatic summarization is the process of reducing a text document with a computer program in order to create a summary that retains the most important points of the original document. Technologies that can make a coherent summary take into account variables such as length, writing style and syntax. Automatic data summarization is part of machine learning and data mining. The main idea of summarization is to find a representative subset of the data, which contains the information of the entire set. Summarization technologies are used in a large number of sectors in industry today. - Wikipedia

The algorithm of this implementation is:

- Find sentences,
- Remove stopwords,
- Create integer values by find and count the matching words,
- Change the integer values by the related words' integer values,
- Normalize values to create scores,
- Order by scores

Install
-------

[](#install)

```
composer require ankit20893/summarize-text

```

Test
----

[](#test)

```
cd project-folder
composer test

```

or

```
cd project-folder
phpunit --colors='always' $(pwd)/tests

```

Examples
--------

[](#examples)

```
use summarizeText\Tool\StopWords\English;

// String contains a long text, see the /res/sample1.txt file.
$text = "Lorem ipsum...";

$api = new TextRankFacade();
// English implementation for stopwords/junk words:
$stopWords = new English();
$api->setStopWords($stopWords);

// Array of the most important keywords:
$result = $api->getOnlyKeyWords($text);

// Array of the sentences from the most important part of the text:
$result = $api->getHighlights($text);

// Array of the most important sentences from the text:
$result = $api->summarizeTextBasic($text);
```

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity33

Early-stage or recently created project

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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/12858398?v=4)[Ankit Singh](/maintainers/ankit20893)[@ankit20893](https://github.com/ankit20893)

### Embed Badge

![Health badge](/badges/ankit20893-summarize-text/health.svg)

```
[![Health](https://phpackages.com/badges/ankit20893-summarize-text/health.svg)](https://phpackages.com/packages/ankit20893-summarize-text)
```

PHPackages © 2026

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