wangfenjin / simple

支持中文和拼音的 SQLite fts5 全文搜索扩展 | A SQLite3 fts5 tokenizer which supports Chinese and PinYin
https://www.wangfenjin.com/posts/simple-tokenizer/
MIT License
527 stars 74 forks source link

您好 如何自定义分词的词汇? #146

Open YahuiWong opened 3 months ago

YahuiWong commented 3 months ago

提问之前先看一下:https://github.com/wangfenjin/simple/issues/87 我试着在jieba的文件夹下定义词汇,但是没有生效,自定义分词如何使用?

wangfenjin commented 3 months ago

user.dict.utf8 那个文件

wangfenjin commented 3 months ago

https://github.com/yanyiwu/cppjieba?tab=readme-ov-file#%E8%87%AA%E5%AE%9A%E4%B9%89%E7%94%A8%E6%88%B7%E8%AF%8D%E5%85%B8

用的是这个库,按照他里面写的方法就会生效

YahuiWong commented 3 months ago

dict/user.dict.utf8 文件里面 的 文字 数字 nz 分别代表什么?

wangfenjin commented 3 months ago

读 cppjieba 那个库的说明吧