PHPackages                             kudashevs/rake-php - 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. kudashevs/rake-php

ActiveLibrary

kudashevs/rake-php
==================

A PHP implementation of the Rapid Automatic Keyword Extraction (RAKE) algorithm.

v2.4.0(1y ago)1167—0%1MITPHPPHP ^8.1CI passing

Since Dec 20Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/kudashevs/rake-php)[ Packagist](https://packagist.org/packages/kudashevs/rake-php)[ RSS](/packages/kudashevs-rake-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)Dependencies (1)Versions (8)Used By (1)

Rake PHP
========

[](#rake-php)

[![Latest Version on Packagist](https://camo.githubusercontent.com/a98c72417b40c8f767086a10e8adc0526d1dae6bd8cca812b4e5f223344a22cf/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b75646173686576732f72616b652d7068702e737667)](https://packagist.org/packages/kudashevs/rake-php)[![Run Tests](https://github.com/kudashevs/rake-php/actions/workflows/run-tests.yml/badge.svg)](https://github.com/kudashevs/rake-php/actions/workflows/run-tests.yml)[![License MIT](https://camo.githubusercontent.com/784362b26e4b3546254f1893e778ba64616e362bd6ac791991d2c9e880a3a64e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d677265656e2e737667)](LICENSE.md)

A PHP implementation of the Rapid Automatic Keyword Extraction (RAKE) algorithm for extracting relevant keywords from individual documents.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require kudashevs/rake-php
```

Example
-------

[](#example)

Here is a common usage example:

```
use Kudashevs\RakePhp\Rake;

$text = "Compatibility of systems of linear constraints over the set of natural numbers.";
$text .= "Criteria of compatibility of a system of linear Diophantine equations, strict inequations, and nonstrict inequations are considered.";
$text .= "Upper bounds for components of a minimal set of solutions and algorithms of construction of minimal generating sets of solutions for all types of systems are given.";
$text .= "These criteria and the corresponding algorithms for constructing a minimal supporting set of solutions can be used in solving all the considered types of systems and systems of mixed types";

$rake = new Rake();
$keywords = $rake->extract($text);

print_r($keywords);
// will result in
Array
(
    [minimal generating sets] => 8.6666666666667
    [linear diophantine equations] => 8.5
    [minimal supporting set] => 7.6666666666667
    [minimal set] => 4.6666666666667
    [linear constraints] => 4.5
    [natural numbers] => 4
    [strict inequations] => 4
    [nonstrict inequations] => 4
    [upper bounds] => 4
    [mixed types] => 3.6666666666667
    [considered types] => 3.1666666666667
    [set] => 2
    [types] => 1.6666666666667
    [considered] => 1.5
    [compatibility] => 1
    [systems] => 1
    [criteria] => 1
    [system] => 1
    [components] => 1
    [solutions] => 1
    [algorithms] => 1
    [construction] => 1
    [constructing] => 1
    [solving] => 1
)
```

More information about RAKE and its usage, you can find in [the original paper](https://www.researchgate.net/publication/227988510_Automatic_Keyword_Extraction_from_Individual_Documents).

Options
-------

[](#options)

The `Rake` class accepts some configuration options:

```
'modifiers' => []               # A string, an instance or an array of Modifiers
'stoplist' => Stoplist::class   # A Stoplist instance that provides a list of stop words
'sorter' => Sorter::class       # A Sorter instance that sorts the output of the algorithm
'exclude' => []                 # An array of words or regexes that will be excluded from a stoplist
'include' => []                 # An array of words or regexes that will be included in a stoplist

```

**Note:** the configuration options `exclude` and `include` accept [simple regexes](#simple-regular-expressions).

**Note:** the configuration option `exclude` has a higher priority than the `include` option.

**Note:** At the moment of instantiation, the `Rake` class can throw an `InvalidOptionType` exception. This exception extends a built-in `InvalidArgumentException` class, so it is easy to deal with.

### Simple regular expressions

[](#simple-regular-expressions)

The configuration options `exclude` and `include` accept regular expressions. The current expressions are currently supported:

- `.+(ly)` - a one or more match with grouping
- `word(s)` - a match with alternation at the end of a word
- `(word|letter)` - an alternation of words

Testing
-------

[](#testing)

```
composer test
```

Contributing
------------

[](#contributing)

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

**Note:** Please make sure to update tests as appropriate.

License
-------

[](#license)

The MIT License (MIT). Please see the [License file](LICENSE.md) for more information.

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance62

Regular maintenance activity

Popularity15

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 98% 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 ~7 days

Total

7

Last Release

460d ago

Major Versions

v1.0.0 → v2.0.02024-12-22

PHP version history (2 changes)v1.0.0PHP ^8.0

v2.0.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/8cb0dfa9fab98bfb2cb6c697744ea5c1f7f57ffd6b0a498df6a17223912b617a?d=identicon)[Sergey Kudashev](/maintainers/Sergey%20Kudashev)

---

Top Contributors

[![kudashevs](https://avatars.githubusercontent.com/u/15892462?v=4)](https://github.com/kudashevs "kudashevs (193 commits)")[![Richdark](https://avatars.githubusercontent.com/u/4463611?v=4)](https://github.com/Richdark "Richdark (4 commits)")

---

Tags

keywordskeywords-extractionrakephpkeywordsrakeextract keywordsRapid Automatic Keyword Extraction

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/kudashevs-rake-php/health.svg)

```
[![Health](https://phpackages.com/badges/kudashevs-rake-php/health.svg)](https://phpackages.com/packages/kudashevs-rake-php)
```

###  Alternatives

[pestphp/pest-plugin-stressless

Stressless plugin for Pest

67792.6k16](/packages/pestphp-pest-plugin-stressless)

PHPackages © 2026

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