How We Can Use Text as Data for Social Science Research
2026-09-11Fall 2026 (115-1) · National Taiwan University (GIND)
NTLDEV 7191 · Fri. 16:30–18:20 · 國發 204
Last compiled: 2026-09-20 04:41:24 (Asia/Taipei)
what it is, how the field got here, what it is used for
Most political activity leaves a textual/digital trace.
Parliamentary speeches, hearing transcripts, party manifestos
Court rulings, bills, administrative records, diplomatic cables
News coverage, social media posts, politicians’ tweets
Open-ended survey responses, interview transcripts
Then: human reading and hand coding (e.g., the Manifesto Project)
Now: scale — millions of documents can be analyzed systematically
Treat text as data: turn unstructured language/data into analyzable quantitative information to answer social-science questions.
Quantitative text analysis and NLP are the toolkit; the social-science question is the job.
corpus → representation → model → validation → inference
Representation: bag of words, word embeddings, language models
Model: dictionaries, classifiers, topic models, scaling
Validation: comparison with hand coding, expert judgment, external criteria
Sources: Laver et al. (2003); Slapin & Proksch (2008); Grimmer (2010); Grimmer & Stewart (2013); Roberts et al. (2014); Rodríguez et al. (2023); Heseltine & Clemm von Hohenberg (2024)
Text-as-data research does two different things.
Measurement
Application
Method: an existing tool, not a new one
LDA (2003), every topic validated by reading.
The contribution is the political science, not a new algorithm.
Building new NLP models is computer science’s job; ours is to use them well to answer a question.
Catalinac (2016), The Journal of Politics 78(1): 1–18
Jankin, Liao & Tang (2026)
Folk Theories of Partisan Conflict
The prompt
“Which factors, events, groups, or institutions do you think caused Democrats and Republicans to view each other more negatively than they did 50 years ago? Please explain what caused what, who or what you think was responsible, and what effects followed.”
The measurement move: code each free-text answer as a directed acyclic graph — nodes are the factors the respondent names (15 factors, 3 domains), edges are the causal links they draw between them.
Jankin, Liao & Tang (2026), Fig. 4: popular folk theories of the divide, grouped by root cause (% = within-party share)
Same factors, opposite arrows — only the direction tells the theories apart; the graph gives each person’s root cause.
Validated: coders agree on which factors each answer names (κ = 0.84); an LLM with the same codebook matches them (F1 = 0.92). Role of text: the theory you hold predicts tolerance of anti-democratic action, net of affect and ideology.
policy, schedule, assessment
A social science course — not a technology course.
This is an introductory course designed for students in the Graduate Institute of National Development and related social science disciplines. No advanced technical training is required. Instead, the course emphasizes how text-as-data and NLP techniques can be applied to answer substantive research questions in political science, political communication, legal studies, sociology, and other social science fields.
Want the technical detail? Model internals, architectures, optimization — this is not that course.
The goal: your own political science / social science paper, written with these methods.
The framework behind these lectures
Grimmer, Roberts & Stewart (2022) — Text as Data: A New Framework for Machine Learning and the Social Sciences, Princeton University Press
You do not need to buy it. This course is paper-first — 3–4 core items a week, mostly journal articles and open tutorials. Required book chapters are provided as excerpts.
Also useful: Benoit (2020) · Nielbo et al. (2024) · Watanabe & Müller, quanteda tutorials · Jurafsky & Martin, SLP (free online)
The term in three blocks.
W1–W2 · Foundations
Introduction to QTA; text preparation and R/Python collaborative workflows.
W4–W8 · Core methods
Tokenisation and DFMs; dictionaries and sentiment; human coding and classification; scaling; topic models.
W9–W13 · Advanced representations
Readability, similarity and embeddings; NLP and transformers; LLMs; multilingual and multimodal sources.
Dates worth writing down
No class: W3 (Sep 25) · W5 (Oct 9) · W11 (Nov 20) · W16 (Dec 25).
This course requires prior experience with R and comfort running some code in a Python environment. No advanced technical training beyond that.
R — most lectures and methods
quanteda, tidytext, text2vec, udpipe, keyATM, spacyr
Python — selectively
transformers, flair (transformer models); gensim, spacy (NLP toolkits); BERTopic (topic models)
You should bring a laptop with a working development environment already set up — most sessions mix a short lecture with coding exercises you run yourself. A detailed setup guide is sent before the first class.
IDE: RStudio for R, Positron for Python and cross-language work.
You should be able to edit and run code, debug, manage packages, and use the integrated terminal.
R Markdown / Quarto (RStudio) and Jupyter / Quarto notebooks (Positron) are helpful but not required — we cover the practical setup and workflow in Week 2.
New to these IDEs? Complete a basic tutorial before Week 2 — so the term is spent on methods, not on fighting your tools.
Written coursework and posters use LaTeX in shared Overleaf projects. Quarto can be used for analysis notebooks. Optional: we may use LM Studio to run LLaMA or Mistral locally, with no API costs.
GitHub for code; Overleaf for written coursework.
Course materials — lectures, code, data, and practice exercises — are on GitHub. Develop research code in a private repository. Submit written coursework through shared Overleaf projects with instructor editing access.
No Git experience required. We use GitHub Desktop (desktop.github.com) — point-and-click, no command line. RStudio and Positron have built-in Git tools too.
Recommended: apply for the free GitHub Student Developer Pack (education.github.com/pack) with your university email. It gives you GitHub Pro, Copilot, and other developer tools at no cost.
Week 1: course rules, expectations, and how materials, coursework, and communication are organized. Week 2: GitHub Desktop and IDE setup — cloning, committing, and sharing code.
This is a 2-credit course. Plan on roughly 3 hours per week outside class.
| Activity | Hours / week |
|---|---|
| Before class — read the assigned text-as-data papers, review the week’s slides | 1–2 |
| After class — self-study coding practice and research-project development | 1–2 |
| Typical weekly total (outside class) | about 3 |
On the readings: the assigned papers come from political science and the social sciences and use text-as-data methods on real research problems. We read them for the methods and how they are applied, not for their substantive findings.
Self-Study Coding Practice
Lab files provide worked examples and exercises for practising course methods.
These practice exercises are ungraded; no lab submission is required.
Class Participation — 20% Active engagement in:
Written coursework and posters are prepared in LaTeX and submitted through shared Overleaf projects.
Final Poster Presentation — 25%
Week 15 poster session.
You present a 5-minute overview of your poster, followed by discussion and peer feedback. You are expected to remain by your poster throughout the session to answer questions. Faculty members may be invited to attend.
Posters should follow PolMeth poster guidelines (polmeth.emory.edu/instructions.html): clear visual design emphasizing the research question, data and methods, key findings, and implications.
Week 14 is a preparatory poster workshop — poster format, visual presentation, and the 5-minute talk. It counts toward class participation.
PolMeth 2025 poster examples · Compare the research question, evidence, and visual organization.
Midterm Research Design Report — 20%.
Your own research project or thesis, written as independent work. The midterm sets up the study that the final paper completes.
What it must contain
And then
Up to 10 pages, no more than 2,500 words. Due: December 4 (Week 13).
Final paper — 25%.
Also independent work. Build on the midterm and complete it with the full empirical analysis — stronger design, robust inference, proper validation and sensitivity tests, then findings, limitations, contribution.
Where to start.
The syllabus lists these as suggested topics, if you do not already have a corpus in mind.
Legislatures and parties
Media and rhetoric
Pick something you can still be working on at the Week 15 poster session.
Research abstract — proposed title and up to 1,000 words; due Oct 23
Midterm report → final paper — develop one original research project
Poster presentation — workshop in W14; presentation in W15
Coding practice — ungraded; no submission
Submit assessed work via Overleaf; up to 15% extra credit
Details: syllabus §8.1.
Two bonuses: a conference acceptance, or an actual journal submission.
Conference acceptance — up to 5%
APSA (early Jan), MPSA (Nov), EPSS (late Dec), COMPTEXT (early Jan), TPSA (summer), JSQPS (late Oct for Winter, Jul/Aug for Summer); PolMeth — Annual Meeting (Mar), Europe PolMeth (mid-to-late Nov), Asian PolMeth (mid-to-late Oct). Months shown are typical submission deadlines, not meeting dates.
Journal submission — up to 10%
Revise & Resubmit, or major/minor revision: +10%. Reject or desk reject: +5%. Eligible journals: SSCI-indexed political science or social science journals.
Land both and you can claim both — 15% maximum.
What you have to show, and what makes a submission ineligible.
Proof: the confirmation email showing the submission and the decision letter.
Not eligible: a submission that breaches NTU regulations on academic integrity, research ethics, student conduct, authorship, copyright, data protection, or generative-AI use, or the rules of the relevant conference or journal. It may also be handled under the relevant NTU procedures.
Writing an MA thesis? You are encouraged to develop thesis-related submissions with your thesis supervisor. GIND students: a thesis-related co-authored submission must be co-authored with a faculty member affiliated with the Graduate Institute of National Development. For any thesis-related co-authored submission, you must be listed as both first author and corresponding author to claim the bonus.
Affiliation and geographic identification — required in every bonus submission.
Use the official name National Taiwan University in the manuscript text, submission metadata, cover letter, acknowledgements, slides, posters, and any public-facing materials.
Do not alter, omit, or downgrade the university name, and do not use wording that misrepresents or diminishes Taiwan’s status. Where a location is required, use “Taipei, Taiwan” or “Taipei, Taiwan (R.O.C.)”.
This does not prohibit evidence-based criticism of Taiwanese politics, institutions, or public policy. It applies to accurate affiliation, geographic description, professional conduct, and non-misleading representation.
If a conference, journal, submission system, or editor asks for wording that changes NTU or Taiwan, you must consult me before proceeding — and you are strongly encouraged to discuss any submission plan with me in advance.
This course follows NTU’s Guidelines for the Use of Generative AI and Research Integrity. AI is a support tool: it does not replace your judgment or your responsibility for what you submit.
1. Permitted uses in your assignments — conceptualisation; initial literature screening, for human verification; supporting writing and editing; audiovisual and interactive components. The argument and the analysis stay your own.
2. Disclose AI use in every submission — research abstract, midterm report, poster, final paper, and bonus submission. State which tool and version, what you asked it to do, how you used the output, and how you checked it. No AI used? Write: “No generative AI tools were used in the preparation of this assignment.”
3. No declaration, no acceptance. An assignment without a declaration is not accepted until a complete one is provided. Misrepresenting AI use, failing to verify AI output, fabricating sources or data through AI, or using AI to bypass a learning goal may be treated as academic misconduct.
Integrity
Deadlines
Details: syllabus §9.1 and §9.3 · NTU student leave procedure: advisory.ntu.edu.tw/CMS/Page/44
National Taiwan University is committed to a respectful, inclusive, and safe learning environment.
You have the right to study free from bullying, harassment, discrimination, sexual harassment, sexual assault, sexual bullying, stalking, and other conduct that undermines dignity or safety.
This course reads politically sensitive material. Disagreement is expected, but it stays evidence-based, professional, and respectful — argue with the evidence, not the person.
If you experience or witness harassment, gender-based misconduct, discrimination, bullying, or a threat to your safety, you are encouraged to seek support. Reports are handled under the relevant NTU procedures.
You are also welcome to contact me directly — I will help you find the right route.
Reporting
Gender Equity Education Committee (性別平等教育委員會) complaint lines: (02) 3366-9607 / (02) 3366-9608, gender@ntu.edu.tw
NTU sexual harassment prevention contact line: (02) 3366-5903, leader@ntu.edu.tw
Or speak to me first if you prefer.
Support and emergencies
Student Counseling Center: (02) 3366-2181, my.ntu.edu.tw/counsel — an initial intake appointment is required; walk-ins welcome in urgent situations
In-college student support, a counselor based in your own college (walk-ins welcome): csw.ntu.edu.tw
Campus Security Center, 24 hours: (02) 3366-9119
If life or physical safety is in danger: 119 (medical) or 110 (police)
Free national hotlines, 24 hours: Mental Health Care Line 1925; Lifeline 1995
Save the 24-hour numbers in your phone now, before you need them.
Take five minutes now.
Student Background and Course Expectations
Scan the code and fill it in before you go.
W2: R, Python, GitHub, and Collaborative Workflow
Bring a laptop with a working development environment — we build on it every week
Install RStudio (R) or Positron (Python and cross-language work); a setup guide goes out before class
Create a free GitHub account and install GitHub Desktop — no command-line Git required
Recommended: apply for the free GitHub Student Developer Pack with your NTU email — GitHub Pro and Copilot at no cost
Reading for W2: quanteda tutorials, Ch. 1 · Grimmer, Roberts & Stewart (2022), Ch. 4 (excerpt provided) · Quarto “Get Started” docs · Posit blog, Privacy and AI Assistants (skim)
Catching up on W1? Benoit (2020) · Grimmer & Stewart (2013) · Nielbo et al. (2024) · Egami et al. (2022)
Grimmer & Stewart (2013)
Grimmer, J. & Stewart, B. M. (2013). Text as Data: The Promise and Pitfalls of Automatic Content Analysis Methods for Political Texts. Political Analysis 21(3): 267–297.
Grimmer, Roberts & Stewart (2022)
Grimmer, J., Roberts, M. E. & Stewart, B. M. (2022). Text as Data: A New Framework for Machine Learning and the Social Sciences. Princeton University Press.
Jankin, Liao & Tang (2026)
Jankin, S., Liao, Y.-C. & Tang, L. (2026). Folk Theories of Partisan Conflict. Working paper.
Rodríguez, Spirling & Stewart (2023)
Rodríguez, P. L., Spirling, A. & Stewart, B. M. (2023). Embedding Regression: Models for Context-Specific Description and Inference. American Political Science Review. doi:10.1017/s0003055422001228
Benoit (2020)
Benoit, K. (2020). Text as Data: An Overview. In L. Curini & R. Franzese (eds.), The SAGE Handbook of Research Methods in Political Science and International Relations: 461–497. Sage. doi:10.4135/9781526486387.n29
Egami et al. (2022)
Egami, N., Fong, C. J., Grimmer, J., Roberts, M. E. & Stewart, B. M. (2022). How to Make Causal Inferences Using Texts. Science Advances 8(42): eabg2652. doi:10.1126/sciadv.abg2652
Grimmer (2010)
Grimmer, J. (2010). A Bayesian Hierarchical Topic Model for Political Texts: Measuring Expressed Agendas in Senate Press Releases. Political Analysis 18(1): 1–35. doi:10.1093/pan/mpp034
Heseltine & Clemm von Hohenberg (2024)
Heseltine, M. & Clemm von Hohenberg, B. (2024). Large Language Models as a Substitute for Human Experts in Annotating Political Text. Research & Politics 11(1). doi:10.1177/20531680241236239
Jurafsky & Martin (2026)
Jurafsky, D. & Martin, J. H. (2026). Speech and Language Processing (3rd ed., online draft). https://web.stanford.edu/~jurafsky/slp3/
Laver, Benoit & Garry (2003)
Laver, M., Benoit, K. & Garry, J. (2003). Extracting Policy Positions from Political Texts Using Words as Data. American Political Science Review 97(2): 311–331. doi:10.1017/s0003055403000698
Nielbo et al. (2024)
Nielbo, K. L. et al. (2024). Quantitative Text Analysis. Nature Reviews Methods Primers 4(1): 25. doi:10.1038/s43586-024-00302-w
Roberts et al. (2014)
Roberts, M. E., Stewart, B. M., Tingley, D. et al. (2014). Structural Topic Models for Open-Ended Survey Responses. American Journal of Political Science 58(4): 1064–1082. doi:10.1111/ajps.12103
Slapin & Proksch (2008)
Slapin, J. B. & Proksch, S.-O. (2008). A Scaling Model for Estimating Time-Series Party Positions from Texts. American Journal of Political Science 52(3): 705–722. doi:10.1111/j.1540-5907.2008.00338.x
Watanabe & Müller (2023)
Watanabe, K. & Müller, S. (2023). Quanteda Tutorials. https://tutorials.quanteda.io