- Introduced by
- Barzilay & Lapata
- Year
- 2008
- Type
- NLP text-level scoring task
What does it do?
Text coherence scoring computes a document-level coherence score from how entities are tracked across the sentences of a text.
It is rooted in the entity-based local coherence model of Barzilay and Lapata (2008), which represents a document as an entity grid of grammatical roles and abstracts it into entity transition sequences. This page documents that entity-grid approach. Some implementations may also offer graph-based or transformer-based variants, whose design is not covered here.
The intuition behind the method
A coherent text is more than a set of grammatical sentences: its ideas flow, and the same entities are introduced, carried forward, and referred back to as the reader moves from one sentence to the next. Text coherence scoring traces these entity patterns automatically and summarises them as one score for the whole document, instead of relying on a reader's impression of readability.
History
Text coherence scoring grew out of the entity-based local coherence model of Barzilay and Lapata (2008). They represented a document as an entity grid of entity transition sequences, recorded distributional, syntactic, and referential information about each entity, and re-conceptualised coherence assessment as a learning task. The same representation was shown to perform well on text ordering, summary coherence evaluation, and readability assessment.
When to use it
Use text coherence scoring when you have running text with sentence order intact and want to assess how well it holds together as a connected whole, for example in summary coherence evaluation, readability assessment, or text ordering. It is a document-level measure and is not designed to judge grammar within a single sentence. The method needs enough text for entity transitions to accumulate; short or fragmented texts offer few transitions and may give less stable scores. A reference text or human ratings may help in interpreting the score; check how your implementation uses one.
Limitations and considerations
- Requires that sentence order be preserved; shuffled or fragmented input undermines the coherence signal the method measures.
- Scores are relative to the learned model and its training data, so without a reference text or human benchmark they are harder to interpret and should not be read as absolute quality grades.
- Needs a reasonable amount of text to produce a stable score, and entity-based models depend on correctly identified entities.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Captures discourse-level structure by tracking how entities are introduced and carried across a document, rather than judging sentences in isolation.
- The entity-grid representation has been applied to text ordering, summary coherence evaluation, and readability assessment, which gives a documented basis for these uses.
- Reduces a whole document to a single coherence score, which can be compared across texts in evaluation settings.
Applications
- Text ordering, where candidate sentence orders of a document are ranked by coherence.
- Summary coherence evaluation, scoring how well an automatically generated or extracted summary holds together.
- Readability assessment, using discourse-level entity patterns as one signal of how easily a text reads.
- Ranking-based text generation and text classification, where entity-transition features serve as inputs to a learned model.
How it works
How it works
The text is read with its original sentence order preserved, because local coherence concerns how each sentence follows from the previous one. Sentence boundaries are identified so that the document is treated as an ordered sequence rather than an unstructured block of text.
The ordered sentences are converted into an entity-grid representation of the discourse. For each entity, the representation records its presence and syntactic role in every sentence, which yields a grid of entity transition sequences. In the 2008 framework, these sequences are also enriched with distributional and referential information about each entity, and they serve as the features for the learned model. The exact role set and feature definitions should be checked in Barzilay and Lapata (2008).
A single coherence score is produced for the document from this representation. The 2008 work re-conceptualises coherence assessment as a learning task, in which entity-transition features feed a learned ranking or classification model. The scale of the score and the training data depend on the implementation, so the number should be interpreted relative to the model used rather than as an absolute quality value.
Before a score is trusted, check that the original sentence order was kept and that entities were identified correctly. Where references or human ratings are available, they can serve as a check on the score. Because the entity-grid approach depends on sentence order, a score computed on reordered or fragmented text should not be read as a measure of the original document's coherence.
Common pitfalls
- Feeding sentences out of their original order removes the entity-transition pattern the method relies on, so the score no longer reflects the text's own coherence. A shuffled document should be expected to score differently, which is the basis of ordering-based evaluation, not an undefined result.
- Treating a raw score as an absolute quality grade without a reference or human benchmark over-interprets it; where possible, compare against references or human ratings.
- Applying it to very short or fragmented text may give less stable scores, since few entity transitions are available to summarise.
- Poor entity recognition propagates into the entity grid, so errors in the upstream representation quietly degrade the final score.
Frequently asked questions
What does a coherence score actually measure?
It measures how well the sentences of a text connect as a whole, specifically whether entities are tracked and referred back to in a way that makes the discourse flow. It is a document-level signal about structure, not about grammar within a single sentence.
Which approach should I use?
The entity-grid model, introduced by Barzilay and Lapata (2008), is the approach this page documents. It records each entity's grammatical role across sentences and turns the resulting entity transition sequences into features for a learned model. Some implementations may offer graph-based or transformer-based variants, but their design is not described here, so consult the implementation documentation before choosing one.
Do I need a reference text?
No. The entity-grid representation is built from the document itself, so a reference is not needed to produce a score. A reference text or human ratings may help you interpret the score; check how your chosen implementation uses one.
Why does sentence order matter so much?
Local coherence is defined by how one sentence follows another and how entities carry over between them. If the original sentence order is not preserved, that transition signal is lost and the score no longer reflects the text's actual coherence.
Related methods
Sources
Barzilay, R. & Lapata, M. (2008). Modeling Local Coherence: An Entity-Based Approach. Computational Linguistics, 34(1), 1-34.
Open DOI referenceGuinaudeau, C. & Strube, M. (2013). Graph-based Local Coherence Modeling. Proceedings of the 51st Annual Meeting of the Association for Computational Linguistics (ACL), 93-103.
Open publication reference