Appendix F
Context-Free Grammars
Appendix: Context-Free Grammars, 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.
- Constituency and rules p. 1
- Constituents p. 1
- Context-free grammars and the formal definition p. 2
- Sentence, clause, noun-phrase, verb-phrase, and coordination rules for English p. 7
- Treebanks p. 14
- The Penn Treebank example p. 14
- Using a treebank as a grammar p. 16
- Heads and head-finding p. 18
- Formal cleanup p. 19
- Grammar equivalence p. 19
- Normal form p. 19
FAQ
Is this the same chapter as Chapter 19?
No. Chapter 19 is the parsing chapter. This appendix is the grammar and treebank background, including a sample of English rules.
Does a treebank replace a handwritten grammar?
It can be read as a grammar: the rules are the productions that occur in the trees. Coverage and probability still depend on what the treebank annotated.
What is a head used for?
It marks the word or child that carries the phrase. Head-finding is a procedure over a tree. It is not itself a parser.
When are two grammars equivalent?
When they license the same language, or the same trees, depending on the notion of equivalence in the section. A normal-form grammar can be equivalent without looking like the original rules.