现在我cut
我想看电视
结果是
我 想 看电视
看了下默认的词库里有 看电视 这个词。。
看电视
我想搞成
我 想 看 电视
闭关修行中......
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
if freq
if freq is not None
jieba.add_word("看电视",0)#或者jieba.del_word("看电视") jieba.add_word("看",100,"v") jieba.add_word("电视",100,"n")
It’s very clear in the documentAdjust the dictionary
Features you need:
There is still a bug in the
jieba.add_word method.
because if freq is 0, there will be this bug🎜jieba mainline has been fixed, but there may be
in older versions
if freq
改成if freq is not None
It’s very clear in the document
Adjust the dictionary
Features you need: