Update __init__.py

remove the empty string return from jieba.cut,this will cause the list of tokens cant be pushed assert error
This commit is contained in:
gispk47 2017-07-01 13:12:00 +08:00 committed by GitHub
parent f69ff15089
commit 669bd14213

View File

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