Port over changes from #1168

This commit is contained in:
Ines Montani 2017-07-01 11:43:54 +02:00 committed by GitHub
parent e265e34e18
commit c91642efd5
1 changed files with 1 additions and 0 deletions

View File

@ -15,6 +15,7 @@ class Chinese(Language):
raise ImportError("The Chinese tokenizer requires the Jieba library: "
"https://github.com/fxsjy/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))