rap2hpoutre/remove-stop-words

从字符串中删除停用词

v0.3.0 2019-12-16 11:43 UTC

This package is auto-updated.

Last update: 2024-09-16 22:14:10 UTC


README

Packagist Build Status Scrutinizer Code Quality

从字符串中删除停用词。它目前支持法语、西班牙语和英语。如果您想添加其他语言,请随时提交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