minh7721 / vietnamese-related-words
从越南语字符串生成相关词汇
1.0.1
2024-05-06 08:58 UTC
Requires
- guzzlehttp/guzzle: ^6.3|^7.0.1
- spatie/laravel-package-tools: 1.16.4
- symfony/process: ^v6.4.7
This package is auto-updated.
Last update: 2024-09-06 09:42:47 UTC
README
composer require nguyenhiep/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`