Named entity disambiguation (NED) determines which real-world entity a mention denotes by using its context and linking it to a reference knowledge base. It resolves distinctions that named entity recognition alone leaves ambiguous, such as Zika virus, Zika virus infection, and congenital Zika syndrome. section 7.1 section 7.2
A knowledge-base NED pipeline usually proceeds through three phases:
- Candidate selection finds possible entities for each recognized mention against a knowledge base. section 7.2
- Candidate ranking scores candidates using surrounding contextual words and selects the highest-scoring target. section 7.2
- Ontology integration combines terminology, classifications, coding standards, and relationships from domain ontologies into a knowledge graph. section 7.2 section 7.8
Disambiguating Zika mentions
In a report about Belize, scispaCy ranks “Zika virus” as UMLS C0318793, “congenital Zika syndrome” as C4546023, and “Zika virus infection” as C0276289. The distinct links preserve medically important differences between related mentions. section 7.1 section 7.2
The linked entities become entry points for retrieving ontology relationships and supporting conceptual search, structured knowledge-based search, interpretability, discovery, and knowledge discovery. Production representations can retain both the original EntityMention and the disambiguated MedicalEntity, preserving mention positions, aliases, and source-page links. section 7.6.3 section 7.7
Traditional systems such as scispaCy depend on domain vocabularies, struggle to extend or update their reference knowledge, and do not use ontology paths during disambiguation. An alternative combines a general-purpose LLM with a domain ontology: full-text search selects candidates, then shortest paths, path-to-text translation, and textual-path summarization provide relational context for final selection. section 8.1 section 8.4
Figure 7.2 Architecture of the NED system, including the three main phases: candidate selection, candidate ranking, and ontology integration
Use the architecture to trace candidate selection, candidate ranking, and ontology integration as one NED workflow. section 7.2
Listing 7.1 Selecting and ranking candidates with the scispaCy model
import spacy
from scispacy.linking import EntityLinker
nlp = spacy.load("en_core_sci_md")
nlp.add_pipe("scispacy_linker",
config={"resolve_abbreviations": True, "linker_name": "umls"})
linker = nlp.get_pipe("scispacy_linker")
linker_dict = linker.kb.cui_to_entity
doc = nlp("""In the week of 13 April, Belize reported for the first time
mosquito-borne Zika virus transmission. Update on the observed increase
of congenital Zika syndrome and other neurological complications
Microcephaly and other fetal malformations potentially associated with
Zika virus infection.""")
for ent in doc.ents:
if "Zika" in ent.text:
print("Recognized entity:", ent.text, ent.start_char, ent.end_char)
print("Ranked target candidates:")
for kb_ent in ent._.kb_ents:
print('-', linker_dict[kb_ent[0]][0], linker_dict[kb_ent[0]][1])
Use the scispaCy listing to implement UMLS candidate retrieval and ranked linking in Python. section 7.2


