yeremi/stopwords

葡萄牙巴西语自然语言处理(NLP)任务开发者使用的便捷工具集的Stopwords(NPL)

v1.1.0 2024-04-08 15:41 UTC

This package is auto-updated.

Last update: 2024-09-08 17:15:18 UTC


README

PHP客户端用于葡萄牙巴西语的StopWords

Stopwords(NPL)为葡萄牙巴西语PHP客户端提供了便捷的工具集,供开发者处理巴西葡萄牙语的自然语言处理(NLP)任务。这个Composer包提供了无缝集成,允许轻松访问用于文本分析和预处理的常用停用词的完整列表。通过轻松过滤掉无关词语,优化文本处理,提高整体准确性来增强您的NLP项目。利用专为巴西葡萄牙语的细微差别量身定制的停用词,借助这个必不可少的PHP客户端发挥其威力。

您还可以在SEO中使用停用词以避免搜索引擎,在爬行或索引大型数据时节省空间和时间。

设置

要运行此项目,请使用Composer本地安装

composer require yeremi/stopwords

如何使用

use Yeremi\StopWords\StopWords;

class StopWordsHandler {

    public function __construct(
        private Stopwords $stopwords
    ) {}
    
    public function handler(string $string): array 
    {
        return $this->stopwords::stop($string);
    }
}

$stopwords = new Stopwords();
$handlesClass = new StopWordsHandler($stopwords);

$string = 'put your long text here';
var_export($handlesClass->handler($string));

许可协议

版权(c)2017 Yeremi Loli 本软件根据GNU通用公共许可证v3.0授权。 查看许可证