01Chapter 1: Why one-hot vectors are not enoughThis chapter assumes that you know basic Python and NumPy, vectors, dot products, and norms. You should also know that a token is a unit of text, such as a word, and that a vocabulary is the set of tokens used by a model.2 min read
02Chapter 2: Dense embeddings: words as points in a vector spaceAssume you know basic Python and NumPy, vectors, dot products, norms, conditional probability, and gradient descent. You should also know that tokenization turns text into tokens such as words or subwords.2 min read
03Chapter 3: Measuring similarity with cosineThis chapter assumes you know basic Python and NumPy, vectors, dot products, vector norms, and the idea of word embeddings. A word embedding is a dense vector that represents a word using patterns learned from its context.2 min read
04Chapter 4: Context windows and (word, context) pairsAssume you know tokenization, vectors, dot products, conditional probability, and the basic idea of gradient descent. This chapter focuses on how a text corpus becomes training data for word2vec and related embedding methods.2 min read
05Chapter 5: word2vec: learning embeddings by predictionThis chapter assumes you know basic Python and NumPy, vectors, dot products, norms, conditional probability, softmax, and gradient descent. It also assumes you can split text into tokens.2 min read
06Chapter 6: Skip-gram: predicting context from a wordThis chapter assumes basic Python and NumPy, vectors, dot products, conditional probability, softmax, gradient descent, and tokenization. You should also understand that a word embedding is a dense vector learned from word usage.2 min read
07Chapter 7: CBOW: predicting a word from its contextAssume you know tokenization, vectors, dot products, softmax, and gradient descent. You should also understand that a word embedding is a learned dense vector.2 min read
08Chapter 8: The cost of the full softmaxThis chapter assumes you know vectors, dot products, norms, conditional probability, softmax, gradient descent, and basic tokenization. We focus on why the original word2vec training objective becomes expensive for a large vocabulary.2 min read
09Chapter 9: Negative samplingThis chapter assumes you understand vectors, dot products, conditional probability, softmax, and gradient descent. It also assumes that a word2vec model creates positive (target, context) pairs from nearby words.2 min read
10Chapter 10: Hierarchical softmaxThis chapter assumes you know vectors, dot products, the sigmoid function, conditional probability, and gradient descent. It also assumes you understand that word2vec learns word vectors by predicting nearby words.2 min read
11Chapter 11: Subsampling frequent wordsAssume you know tokenization, relative word frequency, skip-gram and CBOW, and the basic idea of gradient descent. This chapter explains why word2vec removes some frequent tokens before creating training examples.2 min read
12Chapter 12: Building a co-occurrence matrixPrerequisites: you should know basic Python, NumPy arrays, vectors, and the idea of a training loss. This chapter uses tokenized sentences, so each sentence is already a list of words.2 min read
13Chapter 13: word2vec versus GloVeThis chapter assumes you know vectors, dot products, norms, conditional probability, loss functions, gradient descent, and basic tokenization. You should also know that an embedding is a dense vector learned for each word.2 min read
14Chapter 14: Training word2vec with gensimAssume you know basic Python, NumPy arrays, tokenization, vectors, and the idea of gradient descent. This chapter uses gensim to train a small word2vec model, inspect its vectors, and query similar words.2 min read
15Chapter 15: Using pretrained GloVe vectorsAssume you know Python, NumPy arrays, dot products, cosine similarity, and basic tokenization. This chapter shows how to load pretrained GloVe embeddings, query them, and handle results critically.1 min read
16Chapter 16: Nearest neighbours and analogy queriesAssume you know vectors, dot products, norms, cosine similarity, basic NumPy, and how to train or load a word-embedding model. This chapter focuses on querying embeddings and judging whether the results are meaningful.2 min read
17Chapter 17: Evaluating embeddingsAssume you know vectors, cosine similarity, basic probability, gradient descent, and text tokenization. You should also know how word2vec and GloVe produce embeddings. Evaluation asks whether those vectors capture useful linguistic relationships and whether they improve a real task.2 min read
18Chapter 18: Limitations: polysemy, unknown words and biasAssume you know basic Python, vectors, cosine similarity, gradient descent, and tokenization. This chapter focuses on when word embeddings give misleading results and how to test or reduce those problems.2 min read