mirror of
https://github.com/explosion/spaCy.git
synced 2025-02-26 08:30:48 +03:00
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:
parent
f69ff15089
commit
669bd14213
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue
Block a user