01Chapter 1: What topic modelling does and when to use itTopic modelling finds recurring themes in a collection of documents without requiring a human to label every document first. A topic is a group of words that often appear together and suggest a shared subject, such as football, elections, or software development.2 min read
02Chapter 2: Preparing text for topic modelsAssume you know tokenisation, stop words, and the difference between a word and a document embedding. Preprocessing converts raw documents into a consistent form that a topic model can use. The right amount of cleaning depends on the model.1 min read
03Chapter 3: Bag-of-words and document-term countsThis chapter assumes that you know tokenisation, stop words, TF-IDF, basic probability, and Python package installation. We use these ideas to build the representation that LDA needs.2 min read
04Chapter 4: Dirichlet priors: alpha and etaThis chapter assumes you know tokenisation, stop words, basic probability, and the idea that LDA represents documents with word counts. It focuses on how LDA uses prior distributions before it sees the corpus.2 min read
05Chapter 5: How LDA imagines documents being writtenThis chapter assumes you know tokenisation, stop words, basic probability distributions, and the idea of a vector representation. Latent Dirichlet Allocation (LDA) is a probabilistic model that explains documents as mixtures of topics. It works with word counts, so it does not read word order or sen2 min read
06Chapter 6: Fitting LDA: variational Bayes and Gibbs samplingThis chapter assumes that you know tokenisation, stop words, TF-IDF, basic probability, and the idea of a vector embedding. You should also know that LDA represents each document as word counts and treats each word occurrence as having a hidden topic assignment.2 min read
07Chapter 7: Training and reading an LDA model with gensimAssume you know Python, tokenisation, stop words, TF-IDF, and basic probability. This chapter uses a bag-of-words corpus: each document is represented by word counts, not word order.2 min read
08Chapter 8: Judging topics: coherence and manual inspectionAssume you know Python, tokenisation, stop-word removal, bag-of-words counts, and the basic idea of probability distributions. This chapter also assumes that you can train an LDA or BERTopic model. Evaluation tells you whether the discovered topics are useful, interpretable, and suitable for your ta2 min read
09Chapter 9: Where LDA strugglesAssume you know tokenisation, stop-word removal, TF-IDF, basic probability, and the idea of vector embeddings. This chapter focuses on failure modes rather than the full LDA algorithm.2 min read
10Chapter 10: Sentence embeddings as document representationsThis chapter assumes that you understand tokenisation, TF-IDF, and the basic idea of a vector embedding. You should also know Python and how to install packages with pip.2 min read
11Chapter 11: Reducing embeddings with UMAPAssume you understand tokenisation, TF-IDF, and the basic idea of a vector embedding. You also need Python and pip. This chapter focuses on how UMAP prepares document embeddings for clustering in a BERTopic-style pipeline.2 min read
12Chapter 12: Clustering with HDBSCANThis chapter assumes you understand vector embeddings, distances between vectors, and the basic purpose of UMAP. HDBSCAN is the clustering step in the usual BERTopic pipeline. It groups nearby document vectors without requiring you to choose the number of clusters first.2 min read
13Chapter 13: Describing clusters with c-TF-IDFThis chapter assumes that you understand tokenisation, stop words, TF-IDF, and the basic BERTopic pipeline. You should also know that a document embedding is a numeric representation of a document's meaning.2 min read
14Chapter 14: Running the BERTopic pipeline end to endAssume you know Python, tokenisation, TF-IDF, and the basic idea of vector embeddings. You should also understand that clustering groups similar items without predefined labels.1 min read
15Chapter 15: Understanding and reducing outliersAssume you know how sentence embeddings, HDBSCAN, and c-TF-IDF work. This chapter focuses on documents that BERTopic cannot confidently assign to a cluster.2 min read
16Chapter 16: Refining topics: reduction, merging, and better labelsAssume you understand BERTopic’s embedding, clustering, and c-TF-IDF stages. Topic refinement changes how an already fitted model groups or describes documents. It does not automatically make the underlying text more meaningful, so inspect the result after every change.1 min read
17Chapter 17: Choosing between LDA and BERTopicAssume you know tokenisation, stop words, TF-IDF, basic probability, and the idea of a vector embedding. You should also be able to inspect Python model output and judge whether a discovered theme makes sense for your task.2 min read
18Chapter 18: Tracking topics over timeThis chapter assumes you understand basic LDA, BERTopic, tokenisation, and document embeddings. It also assumes that each document has a reliable date or time period.2 min read