mirror of
				https://github.com/explosion/spaCy.git
				synced 2025-11-04 01:48:04 +03:00 
			
		
		
		
	Auto-format code with black
This commit is contained in:
		
							parent
							
								
									1ee5bee29d
								
							
						
					
					
						commit
						334f1f98d8
					
				| 
						 | 
					@ -1740,10 +1740,16 @@ class Language:
 | 
				
			||||||
                                listeners_replaced = True
 | 
					                                listeners_replaced = True
 | 
				
			||||||
                    with warnings.catch_warnings():
 | 
					                    with warnings.catch_warnings():
 | 
				
			||||||
                        warnings.filterwarnings("ignore", message="\\[W113\\]")
 | 
					                        warnings.filterwarnings("ignore", message="\\[W113\\]")
 | 
				
			||||||
                        nlp.add_pipe(source_name, source=source_nlps[model], name=pipe_name)
 | 
					                        nlp.add_pipe(
 | 
				
			||||||
 | 
					                            source_name, source=source_nlps[model], name=pipe_name
 | 
				
			||||||
 | 
					                        )
 | 
				
			||||||
                    if model not in source_nlp_vectors_hashes:
 | 
					                    if model not in source_nlp_vectors_hashes:
 | 
				
			||||||
                        source_nlp_vectors_hashes[model] = hash(source_nlps[model].vocab.vectors.to_bytes())
 | 
					                        source_nlp_vectors_hashes[model] = hash(
 | 
				
			||||||
                    nlp.meta["_sourced_vectors_hashes"][pipe_name] = source_nlp_vectors_hashes[model]
 | 
					                            source_nlps[model].vocab.vectors.to_bytes()
 | 
				
			||||||
 | 
					                        )
 | 
				
			||||||
 | 
					                    nlp.meta["_sourced_vectors_hashes"][
 | 
				
			||||||
 | 
					                        pipe_name
 | 
				
			||||||
 | 
					                    ] = source_nlp_vectors_hashes[model]
 | 
				
			||||||
                    # Delete from cache if listeners were replaced
 | 
					                    # Delete from cache if listeners were replaced
 | 
				
			||||||
                    if listeners_replaced:
 | 
					                    if listeners_replaced:
 | 
				
			||||||
                        del source_nlps[model]
 | 
					                        del source_nlps[model]
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user