Update __init__.py

Set the "cut_all" parameter to False, or jieba will return ALL POSSIBLE word segmentations.
This commit is contained in:
Yu-chun Huang 2017-09-12 16:23:47 +08:00 committed by GitHub
parent ddaff6ca56
commit 7692b8c071

View File

@ -7,6 +7,6 @@ class Chinese(Language):
def make_doc(self, text):
import jieba
words = list(jieba.cut(text, cut_all=True))
words = list(jieba.cut(text, cut_all=False))
words=[x for x in words if x]
return Doc(self.vocab, words=words, spaces=[False]*len(words))