liveBook · Manning

Named entity recognition

As explained in Knowledge Graphs and LLMs in Action

Named entity recognition is the natural-language-processing technique of identifying mentions of named entities in text and assigning them to predefined categories.

Named entity recognition (NER) identifies mentions in unstructured text and assigns them to predefined categories such as people, organizations, locations, diseases, organisms, or procedures. It converts raw text into structured entities that can support knowledge graphs, search, compliance, information management, and analysis. section 5.2.1 section 7.0

A practical NER pipeline typically follows these stages:

  • Define the entity categories required by the domain instead of relying only on generic Person, Location, or Organization labels. section 5.2.1
  • Extract mentions from text and classify them against the permitted categories, often sentence by sentence. section 8.4.1
  • Return structured records containing the sentence, mention, label, and character offsets. section 8.4.1
  • Pass recognized entities to relation extraction, entity resolution, or named entity disambiguation when precise identity and meaning are required. section 5.4 section 7.1

Biomedical prompt-based extraction

A prompt can restrict an LLM to categories retrieved from SNOMED and request valid JSON. For the sentence “Severe outcomes of Zika are due to its capacity to cross the placental barrier during pregnancy, causing microcephaly and congenital malformations,” the output identifies Zika as an Organism and the latter terms as Clinical findings, with character offsets. section 8.4.1

Figure 8.2 Workflow for a NED system designed to use LLMs and domain-specific ontologies, such as SNOMED, for biomedical text processing. Each stage of this workflow involves interactions to accurately disambiguate entities in the input text.
figure

The workflow diagram shows NER as the first stage of an ontology-backed biomedical disambiguation pipeline, followed by candidate selection and candidate disambiguation. section 8.4

How Knowledge Graphs and LLMs in Action covers it

How deep it goes
Explains category design, prompt-based extraction, structured outputs, and offsets, while stopping short of resolving entity identity or meaning.
Examples
Uses Rockefeller’s diary topics, biomedical Zika sentences, SNOMED categories, JSON records, and character-offset extraction.
What it assumes
Assumes familiarity with unstructured text and domains, while defining entity categories and demonstrating extraction from zero.
What you can do after
Apply it via custom models or LLM prompts to extract domain-specific entities as validated structured records for downstream processing.
How it connects
Connects NER with knowledge graphs, relation extraction, entity resolution, coreference resolution, named entity disambiguation, and domain ontologies.

Also explained in

Compare how 4 books explain named entity recognition →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Knowledge Graphs and LLMs in Action. The section links point to the parts of the book it draws on.