mirror of
				https://github.com/explosion/spaCy.git
				synced 2025-11-04 01:48:04 +03:00 
			
		
		
		
	
						commit
						0c7f5af5ee
					
				| 
						 | 
					@ -8,4 +8,5 @@ class Chinese(Language):
 | 
				
			||||||
    def make_doc(self, text):
 | 
					    def make_doc(self, text):
 | 
				
			||||||
        import jieba
 | 
					        import jieba
 | 
				
			||||||
        words = list(jieba.cut(text, cut_all=True))
 | 
					        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))
 | 
					        return Doc(self.vocab, words=words, spaces=[False]*len(words))
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user