mirror of
				https://github.com/explosion/spaCy.git
				synced 2025-11-04 01:48:04 +03:00 
			
		
		
		
	Revert "TODO REVERT This is a commit with logic changes to trigger tests"
This reverts commit 689fae71f3.
			
			
This commit is contained in:
		
							parent
							
								
									ce5831b5d2
								
							
						
					
					
						commit
						b7d890b557
					
				| 
						 | 
					@ -118,6 +118,29 @@ def make_entity_linker(
 | 
				
			||||||
    save_activations (bool): save model activations in Doc when annotating.
 | 
					    save_activations (bool): save model activations in Doc when annotating.
 | 
				
			||||||
    """
 | 
					    """
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if not model.attrs.get("include_span_maker", False):
 | 
				
			||||||
 | 
					        try:
 | 
				
			||||||
 | 
					            from spacy_legacy.components.entity_linker import EntityLinker_v1
 | 
				
			||||||
 | 
					        except:
 | 
				
			||||||
 | 
					            raise ImportError(
 | 
				
			||||||
 | 
					                """In order to use v1 of the EntityLinker, you must use
 | 
				
			||||||
 | 
					                    spacy-legacy >=XXX."""
 | 
				
			||||||
 | 
					            )
 | 
				
			||||||
 | 
					            # TODO REMOVE this is to trigger a test build
 | 
				
			||||||
 | 
					        # The only difference in arguments here is that use_gold_ents and threshold aren't available.
 | 
				
			||||||
 | 
					        return EntityLinker_v1(
 | 
				
			||||||
 | 
					            nlp.vocab,
 | 
				
			||||||
 | 
					            model,
 | 
				
			||||||
 | 
					            name,
 | 
				
			||||||
 | 
					            labels_discard=labels_discard,
 | 
				
			||||||
 | 
					            n_sents=n_sents,
 | 
				
			||||||
 | 
					            incl_prior=incl_prior,
 | 
				
			||||||
 | 
					            incl_context=incl_context,
 | 
				
			||||||
 | 
					            entity_vector_length=entity_vector_length,
 | 
				
			||||||
 | 
					            get_candidates=get_candidates,
 | 
				
			||||||
 | 
					            overwrite=overwrite,
 | 
				
			||||||
 | 
					            scorer=scorer,
 | 
				
			||||||
 | 
					        )
 | 
				
			||||||
    return EntityLinker(
 | 
					    return EntityLinker(
 | 
				
			||||||
        nlp.vocab,
 | 
					        nlp.vocab,
 | 
				
			||||||
        model,
 | 
					        model,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user