mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 09:56:28 +03:00
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: "
|
raise ImportError("The Chinese tokenizer requires the Jieba library: "
|
||||||
"https://github.com/fxsjy/jieba")
|
"https://github.com/fxsjy/jieba")
|
||||||
words = list(jieba.cut(text, cut_all=True))
|
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))
|
return Doc(self.vocab, words=words, spaces=[False]*len(words))
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user