python - jieba分词怎样 去掉或替换 默认词库里的词?
阿神
阿神 2017-04-18 09:51:40
0
2
1140

现在我cut

我想看电视

结果是

我 想 看电视

看了下默认的词库里有 看电视 这个词。。

我想搞成

我 想 看 电视
阿神
阿神

闭关修行中......

reply all(2)
左手右手慢动作

There is still a bug in the

jieba.add_word method.
jieba mainline has been fixed, but there may be
in older versionsif freq改成if freq is not None

because if freq is 0, there will be this bug🎜
jieba.add_word("看电视",0)#或者jieba.del_word("看电视")
jieba.add_word("看",100,"v")
jieba.add_word("电视",100,"n")
洪涛

It’s very clear in the document
Adjust the dictionary

Features you need:

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template