PHPackages                             amara/keyword-density - 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. [File &amp; Storage](/categories/file-storage)
4. /
5. amara/keyword-density

AbandonedArchivedLibrary[File &amp; Storage](/categories/file-storage)

amara/keyword-density
=====================

Keyword density analyzer. Word frequency counter.

1.0.0(3y ago)02.6kMITPHPPHP ^8.0 || ^8.1

Since Jun 12Pushed 3y agoCompare

[ Source](https://github.com/AmaraLiving/php-keyword-density)[ Packagist](https://packagist.org/packages/amara/keyword-density)[ Docs](https://github.com/AmaraLiving/php-keyword-density)[ RSS](/packages/amara-keyword-density/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (6)Versions (5)Used By (0)

PHP Keyword Density, Word Frequency
===================================

[](#php-keyword-density-word-frequency)

[![Latest Version on Packagist](https://camo.githubusercontent.com/d2f6a91ced61a406016700283ca18f1d27b4ddfebc454fe721390b62798d54c2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616d6172612f6b6579776f72642d64656e736974792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/amara/keyword-density)[![Build](https://github.com/AmaraLiving/php-keyword-density/actions/workflows/ci-build.yml/badge.svg)](https://github.com/AmaraLiving/php-keyword-density/actions/workflows/ci-build.yml)[![Total Downloads](https://camo.githubusercontent.com/b3e86df173be2602b76933e9f573fbdfb7c2a2b284d73d2902c9e57c86c4de46/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616d6172612f6b6579776f72642d64656e736974792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/amara/keyword-density)

Calculates the keyword density of a text as described in [Wikipedia](https://en.wikipedia.org/wiki/Keyword_density). Counts the frequency usage of each word in a text.

Keyword density is the percentage of times a keyword or phrase appears on a text compared to the total number of words on the text. The word frequency counter PHP package can be used to count the frequency usage of each word in a text.

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

[](#installation)

> **Requires [PHP 8.0+](https://php.net/releases/)**

You can install the package via composer:

```
composer require amara/keyword-density
```

Usage
-----

[](#usage)

```
$kw = new Kaiju\KeywordDensity\KeywordDensity();
$kw->setText($text);
print_r($kw->getPopularWords());
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

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

[](#contributing)

Thank you for considering to contribute to this project. All the contribution guidelines are mentioned [here](CONTRIBUTING.md).

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Masroor Ehsan](https://github.com/masroore)
- [All Contributors](../../contributors)

License
-------

[](#license)

This project is an open-sourced software licensed under the [MIT license](LICENSE.md).

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 62.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 ~61 days

Total

4

Last Release

1297d ago

Major Versions

0.0.3 → 1.0.02022-12-14

### Community

Maintainers

![](https://www.gravatar.com/avatar/e696afe1a24280bbde4071ff886394ee586eb9a33d11df0957f1c0c9cd8fd7a4?d=identicon)[ockcyp](/maintainers/ockcyp)

---

Top Contributors

[![masroore](https://avatars.githubusercontent.com/u/200963?v=4)](https://github.com/masroore "masroore (10 commits)")[![oradwell](https://avatars.githubusercontent.com/u/5054896?v=4)](https://github.com/oradwell "oradwell (6 commits)")

---

Tags

phphtmlfilewordtextkeywordsseofrequencyanalyzerdensityword frequencykeyword density

###  Code Quality

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/amara-keyword-density/health.svg)

```
[![Health](https://phpackages.com/badges/amara-keyword-density/health.svg)](https://phpackages.com/packages/amara-keyword-density)
```

###  Alternatives

[blueimp/jquery-file-upload

File Upload widget for jQuery.

141.5M20](/packages/blueimp-jquery-file-upload)

PHPackages © 2026

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