phamluann / rake
快速关键词提取(RAKE)算法
v1.0.0
2023-01-09 04:36 UTC
Requires
- php: >=7.4
Requires (Dev)
- orchestra/testbench: ^6.0
- phpunit/phpunit: ^9.0
This package is auto-updated.
Last update: 2024-09-09 08:31:26 UTC
README
安装
您可以通过composer安装此包
composer require phamluann/rake
用法
- 获取文件内容
$str = file_get_contents(__DIR__ . '/your-file');
- 示例 index.php
<?php require __DIR__ . '/vendor/autoload.php'; use PhamLuann\Rake\Rake; $str = file_get_contents(__DIR__ . '/src/stopword/text.txt'); $rake = new Rake($str); $keyWords = $rake->getKeyword(); $result = ''; foreach ($keyWords as $keyWord => $score) { $result .= $keyWord . ' ==> ' . $score . "\n\r"; } echo $result; ?>
安全
如果您发现任何与安全相关的问题,请通过电子邮件 pvluan17@gmail.com 联系,而不是使用问题跟踪器。
鸣谢
许可证
MIT许可证(MIT)。请参阅许可证文件以获取更多信息。
Laravel包模板
此包是使用Laravel包模板生成的。