rap2hpoutre / remove-stop-words
从字符串中删除停用词
v0.3.0
2019-12-16 11:43 UTC
Requires
- php: ^7.0
Requires (Dev)
- phpunit/phpunit: ^6.5 || ^7.0.2
This package is auto-updated.
Last update: 2024-09-16 22:14:10 UTC
README
从字符串中删除停用词。它目前支持法语、西班牙语和英语。如果您想添加其他语言,请随时提交Pull Request。
安装
composer require rap2hpoutre/remove-stop-words
使用方法
只需调用带有字符串的remove_stop_words
函数。
use function Rap2hpoutre\RemoveStopWords\remove_stop_words; echo remove_stop_words('The quick brown fox jumps over the lazy dog'); // quick brown fox jumps lazy dog
您可以将区域设置作为第二个参数提供
use function Rap2hpoutre\RemoveStopWords\remove_stop_words; echo remove_stop_words('Portez ce vieux whisky au juge blond qui fume', 'fr'); // Portez vieux whisky juge blond fume