mirror of
				https://github.com/explosion/spaCy.git
				synced 2025-11-04 09:57:26 +03:00 
			
		
		
		
	Fix Language.link_components when model is None
This commit is contained in:
		
							parent
							
								
									f3db3f6fe0
								
							
						
					
					
						commit
						d31afc8334
					
				| 
						 | 
					@ -1450,8 +1450,8 @@ class Language:
 | 
				
			||||||
        """
 | 
					        """
 | 
				
			||||||
        for i, (name1, proc1) in enumerate(self.pipeline):
 | 
					        for i, (name1, proc1) in enumerate(self.pipeline):
 | 
				
			||||||
            if hasattr(proc1, "find_listeners"):
 | 
					            if hasattr(proc1, "find_listeners"):
 | 
				
			||||||
                for name2, proc2 in self.pipeline[i:]:
 | 
					                for name2, proc2 in self.pipeline[i+1:]:
 | 
				
			||||||
                    if hasattr(proc2, "model"):
 | 
					                    if isinstance(getattr(proc2, "model", None), Model):
 | 
				
			||||||
                        proc1.find_listeners(proc2.model)
 | 
					                        proc1.find_listeners(proc2.model)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @classmethod
 | 
					    @classmethod
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user