mirror of
				https://github.com/explosion/spaCy.git
				synced 2025-10-31 07:57:35 +03:00 
			
		
		
		
	pipe() takes docs, not examples
This commit is contained in:
		
							parent
							
								
									0f123af35e
								
							
						
					
					
						commit
						d6c4dd6eea
					
				|  | @ -164,8 +164,7 @@ cdef class Parser: | ||||||
|         cdef Doc doc |         cdef Doc doc | ||||||
|         for batch in util.minibatch(docs, size=batch_size): |         for batch in util.minibatch(docs, size=batch_size): | ||||||
|             batch_in_order = list(batch) |             batch_in_order = list(batch) | ||||||
|             docs = [ex.predicted for ex in batch_in_order] |             by_length = sorted(batch, key=lambda doc: len(doc)) | ||||||
|             by_length = sorted(docs, key=lambda doc: len(doc)) |  | ||||||
|             for subbatch in util.minibatch(by_length, size=max(batch_size//4, 2)): |             for subbatch in util.minibatch(by_length, size=max(batch_size//4, 2)): | ||||||
|                 subbatch = list(subbatch) |                 subbatch = list(subbatch) | ||||||
|                 parse_states = self.predict(subbatch) |                 parse_states = self.predict(subbatch) | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user