nggiahao/rake-php

快速自动关键词提取算法(RAKE)的PHP实现

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

快速自动关键词提取算法(RAKE)的PHP实现

当前支持的语言

  • 美国英语
  • 西班牙语

安装

您可以通过composer安装此包

composer require nggiahao/rake-php

使用方法

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
]

测试

composer test

致谢

许可证

MIT许可证(MIT)。请参阅许可证文件获取更多信息。

PHP包模板

此包是使用PHP包模板生成的。