mirror of
				https://github.com/explosion/spaCy.git
				synced 2025-11-04 09:57:26 +03:00 
			
		
		
		
	Update entity_linker.py
This commit is contained in:
		
							parent
							
								
									20b89a9717
								
							
						
					
					
						commit
						0b52b6904c
					
				| 
						 | 
				
			
			@ -48,8 +48,11 @@ DEFAULT_NEL_MODEL = Config().from_str(default_model_config)["model"]
 | 
			
		|||
        "incl_context": True,
 | 
			
		||||
        "get_candidates": {"@misc": "spacy.CandidateGenerator.v1"},
 | 
			
		||||
    },
 | 
			
		||||
    scores=["nel_micro_p", "nel_micro_r", "nel_micro_f"],
 | 
			
		||||
    default_score_weights={"nel_micro_f": 1.0},
 | 
			
		||||
    default_score_weights={
 | 
			
		||||
        "nel_micro_f": 1.0,
 | 
			
		||||
        "nel_micro_r": None,
 | 
			
		||||
        "nel_micro_p": None,
 | 
			
		||||
    },
 | 
			
		||||
)
 | 
			
		||||
def make_entity_linker(
 | 
			
		||||
    nlp: Language,
 | 
			
		||||
| 
						 | 
				
			
			@ -428,7 +431,6 @@ class EntityLinker(Pipe):
 | 
			
		|||
        validate_examples(examples, "EntityLinker.score")
 | 
			
		||||
        return Scorer.score_links(examples, negative_labels=[self.NIL])
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    def to_disk(
 | 
			
		||||
        self, path: Union[str, Path], *, exclude: Iterable[str] = SimpleFrozenList()
 | 
			
		||||
    ) -> None:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user