A PHP implementation of Rapid Automatic Keyword Exraction algorithm (RAKE)
Installs: 8 485
Dependents: 0
Suggesters: 0
Security: 0
Stars: 12
Watchers: 2
Forks: 2
Open Issues: 0
Requires
- php: ^8.0
- illuminate/support: ^8.0|^9.0|^10.0|^11.0
Requires (Dev)
- phpunit/phpunit: ^9.0|10
- symfony/var-dumper: ^6.0
This package is auto-updated.
Last update: 2024-10-13 02:38:25 UTC
README
PHP implementation of Rapid Automatic Keyword Exraction algorithm (RAKE) for extracting multi-word phrases from text.
Installation
composer require assisted-mindfulness/rake
Usage
$rake = new Rake(4, false); $text = "UK Sport set a target of three to seven medals but there were a number of near-misses and disappointment in the sliding events, making it the first time since 2002 that Britain have failed to win a skeleton medal."; $phrases = $rake->extract($text)->sortByScore('desc')->keywords(); /* array:15 [ 0 => "sport" 1 => "target" 2 => "medals" 3 => "number" 4 => "near-misses" 5 => "disappointment" 6 => "sliding" 7 => "events" 8 => "making" 9 => "time" 10 => "2002" 11 => "britain" 12 => "failed" 13 => "skeleton" 14 => "medal" ] */
License
The MIT License (MIT). Please see License File for more information.