liveBook · Manning

Chapter 7: Named entity disambiguation

What you will learn in chapter 7 of Knowledge Graphs and LLMs in Action

The chapter introduction explains what named entity recognition contributes to building knowledge graphs from text and why it is not sufficient for precise domain understanding.

After this chapter you will be able to

What it builds on

Section by section

Introduction

The chapter introduction explains what named entity recognition contributes to building knowledge graphs from text and why it is not sufficient for precise domain understanding.

Key terms: named entity recognition (NER), knowledge graphs (KGs), unstructured data, predefined categories

7.1 From recognition to disambiguation

The section explains why recognizing medical entity mentions is not enough and how disambiguating them against a knowledge base supports an interactive healthcare advisory system.

Key terms: NER, named entity disambiguation, NED, mention, knowledge base, UMLS, IAS, UMLS entity, biomedical ontologies, contextual knowledge

7.2 Understanding named entity disambiguation

This section explains how named entity disambiguation links mentions in text to knowledge-base entities and how ontology integration turns those links into a knowledge graph.

Key terms: NER, NED, candidate selection, candidate ranking, reference knowledge base, scispaCy, ranked candidates, UMLS entity ID, ontology integration, UMLS

7.3 Domain-based NED and LLMs

The section uses a ChatGPT experiment to show why detecting medical entities is not enough for domain-based named entity disambiguation.

Key terms: medical entities, Zika, virus entity, virus infection, NED, UMLS, UMLS ids, knowledge base, KGs

7.4 Business and domain understanding

The section introduces the SoHO business context and explains why knowledge graphs suit its information needs.

Key terms: SoHO, standards and regulations, KG technology, representation flexibility, harmonization, unified view

7.4.1 Context

This section establishes the patient-safety and regulatory context for extracting information from documents about substances of human origin.

Key terms: blood, tissues, and cells (BTC), SoHO, traceability, biovigilance, public health crises, legal framework, European Centre for Disease Prevention and Control (ECDC), European Directorate for the Quality of Medicines & HealthCa, joint regulation, textual documents

7.4.2 Use case definition

The section defines four ways a knowledge graph can help a health policy officer find, connect, interpret, and investigate information across health documents.

Key terms: conceptual search, entity, structured knowledge-based search, domain ontologies, ontology paths, interpretability, discovery, co-occur, co-occurring entities, EDQM guidelines

7.5 Understanding the data

This section introduces the two kinds of information that must be brought together to develop an intelligent system in the SoHO domain.

Key terms: IAS, SoHO domain, heterogeneous information, unstructured, semantically structured data, unified source

7.5.1 Unstructured data

This section identifies the unstructured SoHO documents to be transformed into a knowledge graph and distinguishes the information each provides.

Key terms: impact assessment reports, regulation proposals, stakeholders, position papers, EDQM, ECDC, technical guidance, communicable disease threat reports, epidemic intelligence

7.5.2 Domain ontologies

This section identifies the UMLS, SNOMED, and HPO ontology files used in the medical-entity scenario and explains what each contributes to disambiguation or graph construction.

Key terms: UMLS, MRCONSO.RRF, MRSTY.RRF, UMLS ID, semantic type, NED, SNOMED, description file, relationship file, triplets

7.6 Building a SoHO knowledge graph

This section outlines the steps for building the SoHO knowledge graph and offers two paths through the implementation material.

7.6.1 Defining the schema

This section defines a knowledge graph schema that connects document pages, entity mentions, disambiguated medical entities, and domain ontology entities.

Key terms: File, Page, EntityMention, MedicalEntity, DISAMBIGUATED_TO, MENTIONS_ENTITY, SnomedEntity, HpoEntity, HpoDiseaseEntity, IS_SNOMED_ENTITY

7.6.2 Processing and ingesting documents

This section explains how SoHO documents are converted into reconstructed text and loaded into a knowledge graph.

Key terms: PDF, DOCx, Amazon Textract, OCR, full text, Cypher, Neo4j, KG, page texts

7.6.3 Disambiguating and ingesting medical entities

This section describes how extracted medical-entity results are stored and loaded into a Neo4j graph that retains both text mentions and disambiguated entities.

Key terms: OCR, Python dictionary, Neo4j, scispaCy, EntityMention, Page, sentence index, start and end characters, types, aliases

7.6.4 Processing, loading, and mapping ontologies

The section explains how SNOMED and HPO are loaded into a knowledge graph, enriched and connected to UMLS and medical entities extracted from text.

Key terms: SNOMED_RELATION, type property, SNOMED_IS_A, semantic types, first-level nodes, HPO, RDF/XML, Neosemantics, phenotypic features, annotation file

7.6.5 Generating entity co-occurrences

The section explains how sentence-level co-occurrence relationships connect medical entities in text and support analysis alongside domain ontologies.

Key terms: co-occurrence, Page nodes, Entity nodes, COOCCURR, domain ontologies

7.7 KG-based use cases

This introduction previews KG and NED use-case examples, points to the analysis step, and notes why query results may vary.

7.7.1 Conceptual search

This section contrasts keyword-based search with entity-based conceptual search, using medical examples to show how conceptual search changes results and makes them easier to inspect.

Key terms: conceptual search, full-text search, entity, alias, UMLS, islands of Langerhans, pancreatic islets, entity mentions, NED model, page index

7.7.2 Structured knowledge-based search

The section shows how ontology relationships extend document search beyond matching a named concept to finding text about related medical entities.

Key terms: structured knowledge-based search, conceptual search, domain ontologies, FINDING_SITE, SNOMED ontology, CAUSATIVE_AGENT, Togavirus, longest paths

7.7.3 KG-based interpretability and discovery

This section shows how ontology paths can explain, validate, and extend relationships between medical entities that co-occur in text.

Key terms: co-occurrence, interpretability, discovery, SNOMED, ontology paths, Zika virus, Disease or Syndrome, shortest paths, Dengue Fever, HPO

7.7.4 Uncovering new knowledge

This section uses a Zika virus example to show how a text-derived knowledge graph can suggest a medical relationship missing from an ontology, and why ontology paths must be checked before treating them as evidence.

Key terms: co-occur, KG built from textual content, domain ontologies, co-endemicity, Guillain–Barre syndrome, Infectious neuronitis, SNOMED, CAUSATIVE_AGENT, hub nodes, graph projection

7.8 Summary

Where this is used later

Concepts explained in this chapter

← Chapter 6: Building knowledge graphs with large language models Chapter 8: NED with open LLMs and domain ontologies →

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.