← Speech and Language Processing
NLP›Popular Textbooks› SLP · Chapter 19

Chapter 19

Context-Free Grammars and Constituency Parsing

Chapter: Context-Free Grammars and Constituency Parsing, in Daniel Jurafsky and James H. Martin, Speech and Language Processing, 3rd edition draft, August 19, 2026.

Topics to learn

Page numbers refer to the linked chapter PDF.

FAQ

Does a grammar that accepts a sentence give one analysis?

No. A context-free grammar can license several trees for the same sentence. Recognition and disambiguation are different jobs.

Why convert to Chomsky normal form before CKY?

The classic CKY recurrence assumes binary rules, plus unary handling at the end of a cell. The conversion makes the grammar fit that recurrence. It does not change the language if done correctly.

What is a span score doing in a neural parser?

It scores a candidate constituent from position i to j, often with a label. The parser then searches for a tree whose spans fit together, rather than expanding handwritten rules one at a time.

Is a high sentence-level exact match the usual parse score?

The chapter's evaluation compares constituents with the reference tree. A tree can share most spans with the reference and still fail an exact whole-tree match.