mirror of https://github.com/explosion/spaCy.git
Port over changes from #1168
This commit is contained in:
parent
e265e34e18
commit
c91642efd5
|
@ -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))
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue