← Speech and Language Processing
NLP›Popular Textbooks› SLP · Appendix F

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.

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.