mirror of
https://github.com/explosion/spaCy.git
synced 2024-11-11 12:18:04 +03:00
Merge pull request #1323 from galaxyh/master
Set the "cut_all" parameter in jieba.cut() to False, or jieba will return ALL POSSIBLE word segmentations.
This commit is contained in:
commit
4bee26188d
|
@ -7,6 +7,6 @@ class Chinese(Language):
|
|||
|
||||
def make_doc(self, text):
|
||||
import jieba
|
||||
words = list(jieba.cut(text, cut_all=True))
|
||||
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))
|
||||
|
|
Loading…
Reference in New Issue
Block a user