masroore / keyword-density
Keyword density analyzer. Word frequency counter.
Requires
- php: ^8.0 || ^8.1
- masroore/php-stemmer: ^3.0
- masroore/stopwords: ^1.0
- soundasleep/html2text: ^2.0
- voku/portable-utf8: ^6.0
- writecrow/lemmatizer: dev-master
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.8
- nunomaduro/collision: ^6.0
- nunomaduro/larastan: ^2.0.1
- orchestra/testbench: ^7.0
- pestphp/pest: ^1.21
- pestphp/pest-plugin-laravel: ^1.1
- phpstan/extension-installer: ^1.1
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-phpunit: ^1.0
- phpunit/phpunit: ^9.5
This package is auto-updated.
Last update: 2024-11-13 05:12:30 UTC
README
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 masroore/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.