toanld / vietnamese-related-words
从越南语字符串中生成相关词
v1.0.2
2023-10-05 01:36 UTC
Requires
This package is auto-updated.
Last update: 2024-09-05 03:36:42 UTC
README
composer require toanld/vietnamese-related-words
配置
要配置此包,您首先需要发布设置
php artisan vendor:publish --provider="Nguyenhiep\VietnameseRelatedWords\VietnameseRelatedWordsServiceProvider"
使用方法
$analyer = new Nguyenhiep\VietnameseRelatedWords\VietnameseAnalyzer(); //using vncorenlp $analyer->vncorenlp("một chuỗi tiếng việt"); //["chuỗi tiếng","một chuỗi","chuỗi tiếng việt",] //using coccoc tokenizer $analyer->es_analyze("một chuỗi tiếng việt"); //["một","chuỗi","tiếng việt",] //using VnTokenizer library $analyer->es_analyze("một chuỗi tiếng việt"); //["một","chuỗi","tiếng","việt",]
注意
- if you want to see analying results, add param `true` to analyer construct
- if you want to add more mapping rules, add them in `vietnamese-related-words.php`