mirror of
				https://github.com/explosion/spaCy.git
				synced 2025-10-30 23:47:31 +03:00 
			
		
		
		
	Add check for remove_listener method
This commit is contained in:
		
							parent
							
								
									7694f76dd1
								
							
						
					
					
						commit
						7886d59c56
					
				|  | @ -1732,6 +1732,7 @@ class Language: | ||||||
|         if ( |         if ( | ||||||
|             not hasattr(tok2vec, "model") |             not hasattr(tok2vec, "model") | ||||||
|             or not hasattr(tok2vec, "listener_map") |             or not hasattr(tok2vec, "listener_map") | ||||||
|  |             or not hasattr(tok2vec, "remove_listener") | ||||||
|             or "model" not in tok2vec_cfg |             or "model" not in tok2vec_cfg | ||||||
|         ): |         ): | ||||||
|             raise ValueError(Errors.E888.format(name=tok2vec_name, pipe=type(tok2vec))) |             raise ValueError(Errors.E888.format(name=tok2vec_name, pipe=type(tok2vec))) | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user