mirror of
				https://github.com/explosion/spaCy.git
				synced 2025-11-04 09:57:26 +03:00 
			
		
		
		
	Translate model=True in exclude to lower_model and upper_model
This commit is contained in:
		
							parent
							
								
									cef547a9f0
								
							
						
					
					
						commit
						fdd0923be4
					
				| 
						 | 
					@ -675,6 +675,10 @@ cdef class Parser:
 | 
				
			||||||
            'moves': lambda: self.moves.to_bytes(strings=False),
 | 
					            'moves': lambda: self.moves.to_bytes(strings=False),
 | 
				
			||||||
            'cfg': lambda: ujson.dumps(self.cfg)
 | 
					            'cfg': lambda: ujson.dumps(self.cfg)
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					        if 'model' in exclude:
 | 
				
			||||||
 | 
					            exclude['lower_model'] = True
 | 
				
			||||||
 | 
					            exclude['upper_model'] = True
 | 
				
			||||||
 | 
					            exclude.pop('model')
 | 
				
			||||||
        return util.to_bytes(serializers, exclude)
 | 
					        return util.to_bytes(serializers, exclude)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def from_bytes(self, bytes_data, **exclude):
 | 
					    def from_bytes(self, bytes_data, **exclude):
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user