liveBook · Manning

Coreference chain

As explained in Natural Language Processing in Action, Second Edition

A coreference chain is a set of text mentions that refer to the same underlying entity or discourse referent.

A coreference chain groups text mentions that refer to the same entity or discourse referent. In a spaCy document, Coreferee stores chains as lists of token references, allowing one mention to contain several tokens. section 11.5.1

Read a chain as a set of linked mentions:

  • Each chain represents one distinct real-world object or discourse referent. section 11.5.1
  • Each mention is represented by token positions, so a chain can contain single-token references or multi-token n-grams. section 11.5.1
  • Indexed displays make connections easier to trace across sentence boundaries and support visualizations that share colors or draw graph edges. section 11.10 section 11.5.1

Wikipedia passage

For a passage about Gebru, Coreferee prints one chain as “Gebru(13), she(16), she(26), she(34)” and another as “advice(51), it(56).” The numbers are token positions; the grouped mentions identify two separate referents.

How Natural Language Processing in Action, Second Edition covers it

How deep it goes
Explains the list-of-lists representation, token positions, concrete output, and helper visualizations.
Examples
Uses a Wikipedia passage where Gebru links to repeated “she” mentions and advice links to “it.”
What it assumes
Assumes Python and spaCy familiarity while demonstrating Coreferee installation, transformer-model setup, and pipeline use.
What you can do after
Diagnose coreference outputs by inspecting token-indexed chains and create readable document visualizations.
How it connects
Connects coreference resolution with spaCy, Coreferee, tokenization, document visualization, and knowledge graphs.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Natural Language Processing in Action, Second Edition. The section links point to the parts of the book it draws on.