CSCI-SHU 376: Natural Language Processing
Hua Shen
2026-09-09
Fall 2026
Lecture 4: Word Embedding
Course Agenda: 2026 Fall-NLP-[CSCI-SHU-376]-Class Schedule
Today’s Plan
How do we represent words in NLP models?
How do we represent words in NLP models?
Words
Need for word meaning
Distributional hypothesis
Distributional hypothesis: Ongchoi
Q: what do you think "Ongchoi” means?
A. a savory snack B. a green vegetable
C. an alcoholic beverage D. a cooking sauce
Distributional hypothesis: Ongchoi
Q: what do you think "Ongchoi” means?
A. a savory snack B. a green vegetable
C. an alcoholic beverage D. a cooking sauce
Chard stems and leaves are delicious
Collard greens and other salty leafty greens
Distributional hypothesis: Ongchoi
What should we do? See what other words occur in those contexts
Words and Vectors
Measuring Similarity
Sparse vs Dense Vectors
Why Dense Vectors?
Word Embeddings
Word Embeddings
Word Embeddings
Word Embeddings
Trained Word Embeddings
Today’s Plan
Word2Vec
Skip-gram
Skip-gram
(into, problems), (into, turning), (into, banking), (into, crises), (banking, turning), (banking into), (banking, crises), (banking, as) …
Skip-gram: Objective function
Dot-product of word u and context v
Negative Sampling
Today’s Plan
Continuous Bag of Words (CBOW)
GloVe: Global Vectors
FastText: Subword Embeddings
Today’s Plan
Intrinsic Evaluation: word similarity
Extrinsic Evaluation