Classifying Texts
Lecture Slides Lecture Slides (pdf) Lecture Slides (ipynb)
Tutorial Exercise Tutorial Exercise (pdf) Tutorial Exercise (ipynb)
Text classification and scaling are some of the most common use cases for social scientists. While the foundations of text classification based on human coding predate computerised text analysis of modern era, the incorporation of supervised machine learning techniques has transformed these tasks.
Required Readings
- Chs 16–20 Grimmer, Roberts, and Stewart 2022;
- Pablo Barberá et al. 2021. “Automated Text Classification of News Articles: A Practical Guide.” Political Analysis 29 (1): 19–42. http://pablobarbera.com/static/text_practical_guide.pdf
Additional Readings
- Lori Young and Stuart Soroka. 2012. “Affective News: The Automated Coding of Sentiment in Political Texts.” Political Communication 29 (2): 205–231. https://doi.org/10. 1080/10584609.2012.671234
- Kenneth Benoit et al. 2016. “Crowd-sourced Text Analysis: Reproducible and Agile Production of Political Data.” American Political Science Review 110 (2): 278–295. https://kenbenoit.net/pdfs/Crowd_sourced_data_coding_APSR.pdf
Tutorial
- Working with dictionaries
Assignment 2 (Blackboard)
- Text analysis.
- Due at 16:00 on Wednesday, 9th April (submission on Blackboard);
- Rename the file from
02_assignment.ipynbto02_assignment_lastname_firstname_studentnumber.ipynbbefore submission.