现在我cut
我想看电视
结果是
我 想 看电视
看了下默认的词库里有 看电视
这个词。。
我想搞成
我 想 看 电视
ringa_lee2017-04-18 09:53:40
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
jieba.add_word("看电视",0)#或者jieba.del_word("看电视")
jieba.add_word("看",100,"v")
jieba.add_word("电视",100,"n")
PHP中文网2017-04-18 09:53:40
It’s very clear in the document
Adjust the dictionary
Features you need: