Chapter 18
Sequence Labeling for Parts of Speech and Named Entities
Chapter: Sequence Labeling for Parts of Speech and Named Entities, 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.
- Word classes p. 1
- Mostly English lexical categories, and why a tag is not the word p. 1
- Tagging tasks pp. 4-6
- Part-of-speech tagging p. 4
- Named entities and entity tags p. 6
- HMM tagging p. 8
- Markov chains p. 8
- Hidden states and observations p. 9
- The tagger's components p. 10
- Decoding p. 11
- The Viterbi algorithm and a worked example p. 12
- Conditional random fields p. 15
- Features for part-of-speech tags p. 17
- Features for named entities p. 18
- Inference and training p. 19
- Evaluation and further cases p. 20
- How named-entity recognition is scored p. 20
- Rule-based methods p. 21
- Tagging morphologically rich languages p. 21
FAQ
Why is an HMM a joint model of tags and words?
It has a transition model over tags and an emission model from a tag to a word. Decoding searches for the tag sequence that best explains the observed words, not each word in isolation.
What does Viterbi avoid?
Enumerating every tag sequence. It keeps the best path into each tag at each position and reuses those partial paths.
How is a CRF different from an HMM tagger?
A CRF scores a tag sequence with features of the observation and the tags, and normalizes over tag sequences. It is not limited to the HMM's transition-plus-emission factorization.
Does a correct entity type with the wrong span count as success?
Not under a span-based named-entity score. The predicted span and type have to match the annotation. Token accuracy can hide span errors.