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

Chapter 5

Embeddings: Learning Meaning from Neighbors

Chapter: Embeddings, 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

When are dot product and cosine the same number?

When both vectors have length 1. Learned embeddings are not automatically unit length, so the two scores can rank neighbors differently.

Why does initializing every embedding to zero block learning?

The vectors stay in a symmetric state: each update is a multiple of a zero vector, so the parameters never move apart.

What does skip-gram with negative sampling train?

It raises the score of observed context words for a center word and lowers the score of sampled non-context words. The samples stand in for the rest of the vocabulary.

Does a nearby vector mean a safe or neutral meaning?

No. The geometry repeats regularities in the training text, including stereotypes. Similarity is not a fairness certificate.