From bd3da3d6fb8626613e7ee76931ea6ae67786011e Mon Sep 17 00:00:00 2001 From: Ines Montani Date: Thu, 14 Sep 2017 19:23:13 +0200 Subject: [PATCH] Port over change from #1323 and tidy up --- spacy/lang/zh/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spacy/lang/zh/__init__.py b/spacy/lang/zh/__init__.py index 3f68336f8..46ad3946f 100644 --- a/spacy/lang/zh/__init__.py +++ b/spacy/lang/zh/__init__.py @@ -14,8 +14,8 @@ class Chinese(Language): except ImportError: 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] + words = list(jieba.cut(text, cut_all=False)) + words = [x for x in words if x] return Doc(self.vocab, words=words, spaces=[False]*len(words))