diff --git a/spacy/zh/__init__.py b/spacy/zh/__init__.py index 3f4e36207..1847a7d8d 100644 --- a/spacy/zh/__init__.py +++ b/spacy/zh/__init__.py @@ -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))