1 代码 import jieba import jieba.posseg as pseg jieba.load_userdict("data/entity_noun_dic.txt") jieba.add_word(word="重置", tag="v") jieba.del_word("送别")
jieba.del_word("人流量")result = pseg.cut("请问光猫登陆密码是多少") for w in result:print(w.word, "/", w.flag) # word_list = jieba.cut("请问光猫登陆密码是多少") # print("|".join(word_list)
2 字典格式,三列,分别是词,词频,词性
云计算 5
李小福 2 nr
创新办 3 i
easy_install 3 eng
好用 300
韩玉赏鉴 3 nz
八一双鹿 3 nz
台中
凱特琳 nz
Edu Trust认证 2000
3 词性标签介绍
https://blog.csdn.net/baiyi_canggou/article/details/59110108
https://blog.csdn.net/atishoo_13/article/details/86515594