Skip to content

PHP Keyword density analyzer. Word frequency counter.

License

Notifications You must be signed in to change notification settings

AmaraLiving/php-keyword-density

 
 

Repository files navigation

PHP Keyword Density, Word Frequency

Latest Version on Packagist Build Total Downloads

Calculates the keyword density of a text as described in Wikipedia. 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

Requires PHP 8.0+

You can install the package via composer:

composer require amara/keyword-density

Usage

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

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Thank you for considering to contribute to this project. All the contribution guidelines are mentioned here.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

This project is an open-sourced software licensed under the MIT license.

About

PHP Keyword density analyzer. Word frequency counter.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%