mirror of https://github.com/explosion/spaCy.git
Import Jieba inside zh.make_doc
This commit is contained in:
parent
f292f7f0e6
commit
532318e80b
|
@ -1,5 +1,3 @@
|
|||
import jieba
|
||||
|
||||
from ..language import Language
|
||||
from ..tokens import Doc
|
||||
|
||||
|
@ -8,5 +6,6 @@ class Chinese(Language):
|
|||
lang = u'zh'
|
||||
|
||||
def make_doc(self, text):
|
||||
import jieba
|
||||
words = list(jieba.cut(text, cut_all=True))
|
||||
return Doc(self.vocab, words=words, spaces=[False]*len(words))
|
||||
|
|
Loading…
Reference in New Issue