assisted-mindfulness/rake

A PHP implementation of Rapid Automatic Keyword Exraction algorithm (RAKE)
8,586 12
Install
composer require assisted-mindfulness/rake
Latest Version:0.0.3
PHP:^8.0
License:MIT
Last Updated:Apr 13, 2024
Links: GitHub  ·  Packagist
Maintainer: tabuna

RAKE

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.

Related Packages

doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

637,827,751 9,703
laravel/framework

The Laravel Framework.

589,172,971 34,950
laravel/tinker

Powerful REPL for the Laravel framework.

498,216,183 7,442
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

413,412,504 609
nunomaduro/collision

Cli error handling for console/command-line PHP applications.

391,429,217 4,660