Relation extraction
Relation extraction is a natural-language-processing technique that identifies semantic relationships between entities expressed in text.
Graph Algorithms for Data Science
Relation extraction identifies semantic relationships expressed between entities in text.
- How it is used
- Converts unstructured text into graph-ready relationships for an information-extraction pipeline.
- How deep it goes
- Defines triples, compares rule-based and deep-learning approaches, and implements end-to-end extraction without training a custom model.
- Examples
- Uses Google acquiring YouTube and Apple Inc. founding, employment, acquisition, and product text to inspect extracted triples.
- What you can do after
- Apply it via SpaCy and REBEL to extract relation records from text, inspect results, and construct graph relationships.
Read how Graph Algorithms for Data Science explains relation extraction →
Natural Language Processing in Action, Second Edition
Neural relation extraction is the use of neural models to identify semantic relations between entities in text.
- How it is used
- Builds knowledge graphs and validates generated text by extracting task-relevant relationships from documents.
- How deep it goes
- Explains closed and open neural extraction, pipeline dependencies, and dependency-based patterns, but defers detailed model construction.
- Examples
- Uses Wikipedia text, pharmaceutical documents, and a spaCy dependency parse of a sentence about Gebru’s firing.
- What you can do after
- Evaluate relation-extraction designs by choosing closed or open labels, inspecting dependency structures, and targeting useful relations.
Read how Natural Language Processing in Action, Second Edition explains relation extraction →
Essential GraphRAG
Relationship extraction is the process of identifying and describing semantic connections between entities found in source text.
- How it is used
- Builds structured graph data from text for GraphRAG workflows.
- How deep it goes
- Specifies entity and relationship fields, formatting delimiters, model invocation, and parsing, without detailing extraction evaluation.
- Examples
- Uses PERSON, ORGANIZATION, LOCATION, EVENT, CREATURE, and WEAPON_OR_TOOL entity types.
- What you can do after
- Operate a Python extraction function that produces parsed entities and relationships for database import.
Also covered in
Related concepts
- information extractionpart of · Information extraction is the computational process of identifying specified facts, entities, or relationships in input data and producing structured information.
- structured extractionpart of · Structured extraction is the process of identifying specified information in source content and representing it as organized data in a defined structure.
- transformersused by · Hugging Face Transformers is an open-source software library for loading, using, and training pretrained transformer models across machine-learning tasks.
- tupleproduces · A tuple is a finite, ordered collection of values grouped as a single composite value, often with elements of different types.
Questions about relation extraction
What is relation extraction?
Relation extraction is a natural-language-processing technique that identifies semantic relationships between entities expressed in text.
Which Manning books explain relation extraction?
Graph Algorithms for Data Science, Natural Language Processing in Action, Second Edition and Essential GraphRAG.
What kinds of relation extraction are there?
Kinds of relation extraction include closed relation extraction.
What is relation extraction part of?
Relation extraction is part of information extraction. Information extraction is the computational process of identifying specified facts, entities, or relationships in input data and producing structured information.
What is relation extraction also called?
Relation extraction is also called relationship extraction.
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.


