mirror of
				https://github.com/explosion/spaCy.git
				synced 2025-11-04 01:48:04 +03:00 
			
		
		
		
	Update textcat pre-processing after to_array change
This commit is contained in:
		
							parent
							
								
									f81cc0bd1c
								
							
						
					
					
						commit
						4eb5bd02e7
					
				| 
						 | 
				
			
			@ -94,7 +94,6 @@ def _zero_init(model):
 | 
			
		|||
@layerize
 | 
			
		||||
def _preprocess_doc(docs, drop=0.):
 | 
			
		||||
    keys = [doc.to_array([LOWER]) for doc in docs]
 | 
			
		||||
    keys = [a[:, 0] for a in keys]
 | 
			
		||||
    ops = Model.ops
 | 
			
		||||
    lengths = ops.asarray([arr.shape[0] for arr in keys])
 | 
			
		||||
    keys = ops.xp.concatenate(keys)
 | 
			
		||||
| 
						 | 
				
			
			@ -521,7 +520,6 @@ def zero_init(model):
 | 
			
		|||
@layerize
 | 
			
		||||
def preprocess_doc(docs, drop=0.):
 | 
			
		||||
    keys = [doc.to_array([LOWER]) for doc in docs]
 | 
			
		||||
    keys = [a[:, 0] for a in keys]
 | 
			
		||||
    ops = Model.ops
 | 
			
		||||
    lengths = ops.asarray([arr.shape[0] for arr in keys])
 | 
			
		||||
    keys = ops.xp.concatenate(keys)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user