remove stop words
v0.3.0
从字符串中remove stop words 。目前它有法语、西班牙语和英语版本。如果您想包含您的语言,请随时提交 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