Text Classification
Text classification comprises all kinds of tasks that assign a label or category to a textual input, e.g. words, phrases, sentences, or longer documents.
Lecture Slides
Lab
In this lab, you will train different models to classify speeches from the Swedish parliament with respect to the political affiliation of the speaker.
Reading Material
- Chapter 4 of Jurafsky & Martin (2025) on text classification and logistic regression
- Optionally, chapter 10 of Jurafsky & Martin (2025) for more details about the BERT architecture