nggiahao/rake-php

PHP implementation of Rapid Automatic Keyword Exraction algorithm (RAKE)

0.1 2020-11-30 15:56 UTC

This package is auto-updated.

Last update: 2024-09-28 10:35:43 UTC


README

Latest Version on Packagist Total Downloads License

PHP implementation of Rapid Automatic Keyword Exraction algorithm (RAKE)

Currently Supported Languages

  • English US
  • Spanish

Installation

You can install the package via composer:

composer require nggiahao/rake-php

Usage

use Nggiahao\RakePhp\RakePhp;

$text = "The Criteria of compatibility of a system of linear Diophantine equations, strict inequations, and nonstrict inequations are considered the.
         Upper bounds for components of a minimal set of solutions and algorithms of construction of minimal generating sets of solutions for all types of systems are given.";

$stop_words = new English();
$keywords = RakePhp::create($stop_words)->extract($text)->sortByScore('desc')->keywords();
array:16 [
  "linear diophantine equations" => 9.0
  "minimal generating sets" => 8.5
  "minimal set" => 4.5
  "strict inequations" => 4.0
  "nonstrict inequations" => 4.0
  "upper bounds" => 4.0
  "criteria" => 1.0
  "compatibility" => 1.0
  "considered" => 1.0
  "components" => 1.0
  "solutions" => 1.0
  "algorithms" => 1.0
  "construction" => 1.0
  "types" => 1.0
  "systems" => 1.0
  "given" => 1.0
]

Testing

composer test

Credits

License

The MIT License (MIT). Please see License File for more information.

PHP Package Boilerplate

This package was generated using the PHP Package Boilerplate.