⌂ Course index
🐞 Feedback
中文
Interactive features failed to initialize, so a static version with all chapters expanded in order is shown; just scroll down to read. (Interactive labs, quiz grading, progress and the slide panel need JavaScript; if an in-app preview shows no interactivity, use "Share → Open in Safari" or open the file in a desktop browser.)
00 · This week's guide

W1: Introduction to Text as Data (How We Can Use Text as Data for Social Science Research)

Week 1 covers two things: Part 1 explains what text as data is, how the field developed and what it is used for; Part 2 explains how this course works: schedule, tools, grading, extra credit, AI use and academic integrity.Slides 1–2

What you should be able to explain this week

The slides do not list "learning goals"; the four points below are organized from the structure of slides 2–34 (the organization is a supplement; every item has a slide source):

  1. Explain in one sentence what text as data means, and name each step of the pipeline corpus → representation → model → validation → inference.Slide 4
  2. Tell whether a study is Measurement (contribution in measurement / method) or Application (contribution in substantive findings), and explain why validation has always been a core requirement.Slides 5–6
  3. State the course's grading structure, the three key deadlines (10/23, 12/4, 12/18) and the conditions of the extra-credit rules.Slides 14, 25–28
  4. Know how you must disclose generative AI use in assignments, and the consequences of not disclosing.Slide 29

After reading a chapter, come back and tick the goals you think you can now meet (stored only in this browser):

Concept map: from text to inference Slide 4

Slide 4 writes text-as-data research as a chain: corpus → representation → model → validation → inference. Click each step for an explanation (the explanations are organized from slide 4; the examples are supplementary):

→ → → →
  • Corpus: e.g., parliamentary speeches, party manifestos, court rulings, news, tweets, open-ended survey responses.Slide 3
  • Representation: bag of words, word embeddings, language models.Slide 4
  • Model: dictionaries, classifiers, topic models, scaling.Slide 4
  • Validation: comparison with human coding, expert judgment, external benchmarks.Slide 4
  • Inference: use what you measured to answer a social science question; "the social science question is the job."Slide 4

Materials used in these notes

MaterialHow these notes use it
Slides W1/slide/week1.pdf (38 pages, compiled 2026-09-20)Chapter structure, all course rules and numbers; the slide panel on the right shows page images of this PDF.
Syllabus NTLDEV_7191_1151.pdfThe grading table on slide 25 is an image, so weights and deadlines were checked against the text table in syllabus §8.1 (page 40 of the syllabus PDF); the workload differs, see chapter 06.
W1/papers/: Grimmer & Stewart (2013), Benoit (2020), Baden et al. (2022)Chapter 12 reading guide, with page numbers.
R scriptsW1 has no classroom or lab R script. Chapter 11 is a small Supplement (not from the lecture) written by the TA: it uses quanteda to treat this week's slides as a 38-document corpus, and all output comes from actually running it locally.

How to use these notes

  • Reading the chapters on the left in order works best. Chapters 00–04 are Part 1 (research content), chapters 05–10 are Part 2 (course rules), and chapter 11 is a supplementary lab.
  • Badges marked Slide N are clickable: the slide opens on the right (or via the button at bottom right), and the panel also follows as you scroll.
  • The blue "interactive lab" boxes can be used directly and come in three kinds: real data (the schedule, grading weights, extra-credit rules, Baden et al.'s language statistics, the slide corpus exported from R in chapter 11), toy intuition (marked "Supplement"; the numbers are not course results) and practice (sorting questions, scenario judgments, flashcards, an AI disclosure statement generator, a research-idea builder).
  • Each chapter ends with a "Self-check"; chapter 14 has a final review (you can redo only the questions you got wrong).
  • Progress and your entries are stored only in this browser's localStorage; chapter 14 can clear them with one click.
Core idea this week: quantitative text analysis and NLP are tools; the social science question is the job; and at every stage of this field, validation is the one requirement that has never gone away.Slides 4–5

Dates to write down Slide 14

Dates worth writing down (Slide 14)
  • W7 · 10/23: individual research abstract due
  • W13 · 12/4: midterm research design report due
  • W14 · 12/11: poster workshop
  • W15 · 12/18: final poster presentations
  • Deadline for the full paper (manuscript) and extra credit: TBA
  • No class: W3 (9/25), W5 (10/9), W11 (11/20), W16 (12/25)

Self-check

1. According to slide 4, which order is correct?
First the corpus, then decide how to represent the text, then model and validate, and only then make inferences.Slide 4
2. Slide 4 says "Quantitative text analysis and NLP are the toolkit; the social-science question is …"?
"the social-science question is the job": methods are tools; the question is the work.Slide 4
01 · Part 1

Why text? What is text as data

Why text? Slide 3

The starting point of slide 3: most political activity leaves a textual or digital trace.

Where texts come from (Slide 3)
  • Parliamentary speeches, hearing transcripts, party manifestos
  • Court rulings, bills, administrative records, diplomatic cables
  • News reports, social media posts, politicians' tweets
  • Open-ended survey responses, interview transcripts
Then vs. now (Slide 3)

Then: human reading and hand coding (e.g., the Manifesto Project).

Now: scale: millions of documents can be analyzed systematically.

Benoit (2020) opens in a similar way: legislative debates, manifestos, committee transcripts, speeches, lobbying documents, court opinions and laws are not only recorded today, but many are in forms that are easy to turn into structured data (Benoit 2020, repo PDF p. 2).

What is "Text as Data"? Slide 4

Definition (Slide 4): treating text as data: turning unstructured language/data into quantitative information that can be analyzed, in order to answer social science questions.

Slide 4 also lists common options at three stages of the pipeline:

StageOptions listed on slide 4Roughly which weeks of this course (from syllabus schedule titles; supplement)
Representationbag of words, word embeddings, language modelsW4 (tokenisation, DFM), W9 (embeddings), W10, W12 (transformers, LLMs)
Modeldictionaries, classifiers, topic models, scalingW4 (dictionaries), W6 (classification), W7 (scaling), W8 (topic models)
Validationcomparison with human coding, expert judgment, external benchmarksAppears every week

The first step of representation: bag of words

This week's slides only name "bag of words"; the details come in W4. Here we borrow Grimmer & Stewart (2013) to build intuition: when turning text into numbers, the most consequential and most surprising step is discarding word order, assuming documents are a "bag of words". The authors argue that examples where word order changes the meaning of a sentence are rare in practice, and unigrams alone usually suffice to convey the gist of a text; if that is unacceptable, bigrams and trigrams can be added to retain some word order (Grimmer & Stewart 2013, p. 272).

They also warn that all quantitative models of language are wrong. Their example is the classic joke "Time flies like an arrow. Fruit flies like a banana.": the same "flies like" is a metaphor in the first half and literal in the second (p. 270). A bag of words cannot see this difference at all.

Interactive: bag-of-words builder Slide 4

🧺Toy demo: throwing sentences into a bag of wordsSupplement (not from the lecture)

Type a document (in English) in each box; the document-feature matrix below updates instantly. The tokenization rule is a simplified version written for these notes (splitting on spaces and punctuation), not quanteda's rule; quanteda's real results are in chapter 11.

Try "Example: swapped word order": the two sentences mean opposite things but are identical in a unigram bag of words; only after ticking bigrams can they be told apart. This is the trade-off Grimmer & Stewart describe.

Self-check

1. According to slide 3, what did analysis of political texts mainly rely on in the past?
Then: human reading and hand coding; Now: scale.Slide 3
2. Which of these does slide 4 list under Model rather than Representation?
Model: dictionaries, classifiers, topic models, scaling. The other three are representations.Slide 4
3. What does the bag-of-words representation throw away?
Grimmer & Stewart (2013, p. 272): the most consequential step is discarding word order and keeping only how many times each word appears.
02 · Part 1

How the field got here

Three phases, seven studies Slide 5

PhaseStudySlide 5's one-liner
2003–2010 · Bag of wordsWordscores (2003), Laver, Benoit & Garry · APSR—
Wordfish (2008), Slapin & Proksch · AJPS—
Expressed agenda (2010), Grimmer · Political Analysis—
2013–2014 · ValidationPromise and Pitfalls (2013), Grimmer & Stewart · Political Analysisthe four principles — and “validate”
Structural topic model (2014), Roberts et al. · AJPStopics as a function of covariates
2023– · Meaning in contextEmbedding regression (2023), Rodríguez, Spirling & Stewart · APSRwhat a word means, by party and era
LLMs as annotators (2024), Heseltine & Clemm von Hohenberg · Research & Politics—

Slide 5's summary: what did each phase add? bag of words → validation & covariates → meaning in context → models that label for you.Slide 5

Interactive: click a phase Slide 5

🕰A timeline of text as dataClick a dot for details
Click a dot on the timeline.

Sources of the descriptions: sentences in quotation marks come from slide 5; descriptions of the other three are based on the paper titles listed on slides 35–38 (for Wordscores and Wordfish, see also Grimmer & Stewart 2013, p. 269); "which week of this course" is matched from the syllabus schedule titles and is supplementary.

Practice: put them in chronological order

🔢Click in orderPractice

Click the studies below from earliest to latest. A wrong click gives a hint, and you can start over.

Not started yet.

“Validation is the one demand that never went away.” Slide 5

This sentence is one of the most important messages of the week. Grimmer & Stewart's (2013) fourth principle is "Validate, Validate, Validate" (Table 1, p. 269); Baden et al. (2022) surveyed authors of text-analysis studies and found that 40% saw validity as a major concern and another 35% as a minor concern (p. 6). In the era of LLMs as annotators, the question is still: does what the model labels match the concept you want to measure?

In plain words (supplement)

The tools keep changing: word counts, topics, vectors, LLMs. But every generation of researchers has to answer the same question: "How do you know you measured the thing you say you measured?"

Self-check

1. According to slide 5, what key ingredient did the Structural topic model (2014) add?
STM: topics as a function of covariates (W8 uses party and period as covariates).Slide 5
2. Which requirement does slide 5 say never went away?
“Validation is the one demand that never went away.”Slide 5
03 · Part 1

Two kinds of work: Measurement and Application

Text-as-data research does two different things Slide 6

MeasurementApplication
Core questionHow do you turn a concept into a credible, text-based measure?What substantive question does this measure answer?
ContributionNew methods, new measures, new datasetsNew empirical findings, theory testing
Star of the showThe method itselfResearch design and identification

Mapping to the textbook Slides 6, 12

The textbook Grimmer, Roberts & Stewart (2022) divides the work into three tasks: discovery, measurement, inference. This course merges them into two: measurement ≈ discovery + measurement; application ≈ inference.Slide 6 The book is the framework for the lectures, but you do not need to buy it; the course is paper-based, with 3–4 core readings per week, and excerpts of required book chapters will be provided.Slide 12

+ = |

Practice: which kind of work is this?

🧭Measurement or Application?Practice · using slide 6's definitions

Each item describes the "main contribution" of a study. Pick one according to slide 6's definitions. The scenarios were written for these notes (supplement); the basis for judging is slide 6.

Not answered yet.

Self-check

1. What is the "star of the show" in an Application study?
Application: star of the show = research design and identification.Slide 6
2. This course's "measurement" merges which two of the textbook's tasks?
measurement ≈ discovery + measurement; application ≈ inference.Slide 6
04 · Part 1

Two research cases: From Pork to Policy, and turning open-ended answers into causal maps

Case 1: From Pork to Policy Slide 7

Catalinac (2016), The Journal of Politics 78(1): 1–18. Slide 7 focuses on the role of the method:

  • Method: an off-the-shelf tool, not a new one: LDA (2003), with every topic validated by reading.
  • The contribution is political science, not a new algorithm.
  • Building new NLP models is the job of computer science; our job is to use them well to answer a question.Slide 7

Slide 7 shows a screenshot of the paper's abstract; W1's papers/ folder does not contain the full text, so these notes do not summarize the paper's content or numbers. This paper reappears in W8 (topic models).

Case 2: coding open-ended answers as causal maps Slides 8–9

Research design (Slide 8)
  • Jankin, Liao & Tang (2026), Folk Theories of Partisan Conflict (working paper)
  • Question: does what a partisan believes about "why the country is divided" matter beyond how much they dislike the other side?
  • Data: 1,200 US adults (quota-matched); several open-ended questions (the figure on the slide codes Q7).
The prompt (Slide 8, original wording)

“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 key measurement step (Slide 8): code each free-text answer as a directed acyclic graph (DAG): nodes are the factors the respondent mentions (15 factors, 3 domains), and edges are the causal links they draw.
  • Same factors, opposite arrows: only the direction separates the two theories; the graph gives each person's root cause.Slide 9
  • Validation: coder agreement on "which factors each answer mentions" κ = 0.84; an LLM using the same codebook compared with human coding F1 = 0.92.Slide 9
  • What the text does: the theory you hold predicts your tolerance of anti-democratic actions, even after controlling for affective polarization (affect) and ideology.Slide 9

The figure on slide 9 (Fig. 4) shows common folk theories grouped by root cause (% = share within party); these notes do not transcribe the figure's numbers, so see the slide on the right. This is a working paper; the repo has no full text.

Interactive: same factors, opposite arrows Slide 9

🕸Toy demo: two respondents' causal mapsSupplement (not from the lecture)

The three factors below are a toy example made up for these notes, not the paper's 15 factors. Click the button next to each edge to flip the arrow (or delete it), and see how the "root cause" (a factor that no arrow points to) changes.

Respondent A
Respondent B

Interactive: what do κ and F1 compute? Slide 9

🧮Agreement calculatorSupplement (not from the lecture) · formula demo

Suppose two coders (or "human vs. LLM") each judge whether N answers "mention a given factor". Enter the four cells of the 2×2 table. These are toy numbers, not the paper's data; the slide's κ = 0.84 and F1 = 0.92 cannot be reproduced from the data in the repo.

Coder 2: yesCoder 2: no
Coder 1: yes
Coder 1: no

Self-check

1. What does slide 7 emphasize as the contribution of Catalinac (2016)?
The contribution is the political science, not a new algorithm.Slide 7
2. In Jankin, Liao & Tang's causal maps, what distinguishes two theories with "the same factors"?
Same factors, opposite arrows — only the direction tells the theories apart.Slide 9
3. What does the F1 = 0.92 on slide 9 compare?
κ = 0.84 is between human coders; F1 = 0.92 is the LLM (same codebook) vs. humans.Slide 9
05 · Part 2

Course positioning, materials and the 16-week schedule

Who is this course for? Slide 11

A social science course, not a technology course.Slide 11

This is an introductory course designed for students of the Graduate Institute of National Development and related social science fields, and it requires no advanced technical training; the focus is on using text-as-data and NLP techniques to answer substantive research questions in political science, political communication, legal studies, sociology and similar fields.

  • Want to learn model internals, architectures, optimization? This is not that course.
  • Goal: use these methods to write your own political science / social science paper.Slide 11

Where the materials come from Slide 12

  • Lecture framework: Grimmer, Roberts & Stewart (2022), Text as Data: A New Framework for Machine Learning and the Social Sciences (Princeton University Press). This course's two kinds of work simplify the book's discovery → measurement → inference.
  • No need to buy the book: the course is paper-first, with 3–4 core materials per week, mostly journal articles and open tutorials; excerpts of required book chapters are provided.
  • Also useful: Benoit (2020), Nielbo et al. (2024), Watanabe & Müller's quanteda tutorials, Jurafsky & Martin's SLP (free online).Slide 12

The semester in three blocks Slide 14

W1–W2 · Foundations

Introduction to quantitative text analysis; text preparation and a collaborative R/Python workflow.

W4–W8 · Core methods

Tokenisation and DFMs; dictionaries and sentiment analysis; human coding and classification; scaling; topic models.

W9–W13 · Advanced representations

Readability, similarity and embeddings; NLP and transformers; LLMs; multilingual and multimodal data.

No class: W3 (9/25), W5 (10/9), W11 (11/20), W16 (12/25).Slide 14

Interactive: the 16-week schedule Slides 13–14

📅Schedule and deadlinesReal course data

The schedule on slide 13 is an image; the weeks, dates, topics and notes here are taken from the schedule in the syllabus (page 10 of the syllabus PDF) and cross-checked against the deadlines on slide 14. Pick a date to see how many days remain until the next deadline.

WeekDateTopicNotes
W19/11Introduction to Quantitative Text Analysis
W29/18Text Preparation in R and Python: Collaborative Workflow
W39/25Mid-Autumn Festival (No Class)No class
W410/2Tokenisation, Document-Feature Matrices, Dictionaries, and Sentiment Analysis
W510/9National Day Observed (No Class)No class
W610/16Human Coding and Document Classification
W710/23Supervised, Unsupervised, and Semi-Supervised ScalingIndividual research abstract due
W810/30Topic Models and Their Variants
W911/6Describing and Comparing Texts: Readability, Similarity, and Word Embeddings
W1011/13NLP Pipelines and Transformers: Annotation, Classification, and Interpretability
W1111/20NTU Sports Day (No Class)No class
W1211/27Large Language Models and Multi-Agent Systems
W1312/4New Forms of Textual Data: Multilingual and Multimodal SourcesMidterm research design report due
W1412/11Poster Workshop: Format, Visual Presentation, and 5-Minute TalkPoster revision clinic
W1512/18Final Poster Presentations5-minute talk; peer feedback
W1612/25Constitution Day Holiday (No Class)No class; full paper and extra-credit deadline TBA

Self-check

1. What does slide 11 say this course is "not"?
A social science course — not a technology course.Slide 11
2. Which of these weeks does have class?
The no-class weeks are W3, W5, W11 and W16. W13 has class, and it is the midterm report deadline.Slide 14
06 · Part 2

Before the course: R, Python, IDE, GitHub, Overleaf

Languages and packages Slide 15

This course requires prior experience with R and the ability to run some code in a Python environment; beyond that, no advanced technical training is needed.

R: most of the course and methods

quanteda, tidytext, text2vec, udpipe, keyATM, spacyr

Python: optional

transformers, flair (transformer models); gensim, spacy (NLP tools); BERTopic (topic models)

Please bring a laptop with a working development environment already installed: most sessions are a short lecture plus coding exercises you run yourself. A detailed setup guide will be sent before the first class.Slide 15

IDE and writing tools Slide 16

  • 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 built-in terminal.
  • R Markdown / Quarto (RStudio) and Jupyter / Quarto notebooks (Positron) help but are not required; W2 covers the actual setup and workflow.
  • Never used these IDEs? Complete a basic tutorial before W2, so the semester is spent on methods, not fighting tools.
  • Written assignments and posters use LaTeX, done in shared Overleaf projects; Quarto can be used for analysis notebooks. Optional: possibly LM Studio to run LLaMA or Mistral locally, with no API costs.Slide 16

GitHub for code, Overleaf for written work Slide 17

  • Course materials (slides, code, data, exercises) are all on GitHub. Keep research code in a private repository.
  • Written assignments are submitted through shared Overleaf projects, with edit access for the instructor.
  • Create a free GitHub account and install GitHub Desktop (point-and-click, no command line needed); RStudio and Positron also have built-in Git tools.
  • Apply for the free GitHub Student Developer Pack (GitHub Pro, Copilot, etc.) with your university email.
  • W1: how course rules and materials, assignments and communication are organized; W2: GitHub Desktop and IDE setup (clone, commit, sharing code).Slide 17
Extra details from the syllabus (syllabus §8.1, syllabus PDF p. 39)

Use a separate Overleaf project for each graded assignment, named with your name and the assignment; before the deadline invite the instructor as Editor (can edit); view-only access does not count as a submission. The project must contain the complete, up-to-date source files and compile successfully to PDF. A free account allows one collaborator per project, which is enough.

How much time per week? Slide 18

This is a 2-credit course. Slide 18's estimate:

ActivityHours per week (Slide 18)
Before class: read the assigned text-as-data papers, look over this week's slides1–2
After class: self-paced coding exercises and research project development1–2
Total outside class (typical)about 3
Slides and syllabus differ (both shown)

Syllabus §4 (syllabus PDF pp. 4–5) splits out-of-class time into three rows: pre-class reading 1–2, post-class lab 0.5–1, research project 1.5–2, 3–4 hours in total, and notes that more time may be needed near deadlines. Slide 18 has two rows totaling "about 3". Both come from the instructor; these notes do not decide which is authoritative; go by what the instructor says in class.

About the readings: the assigned papers come from political science and the social sciences and use text-as-data methods on real research questions. We read them for the methods and how they are applied, not for their substantive findings.Slide 18

Interactive: checklist before W2 Slides 15–17, 34

✅Setup checklistPractice · autosaved

Every item comes from slides 15–17 and 34. Progress is shown as you tick them.

Self-check

1. Where should research code be kept?
Develop research code in a private repository.Slide 17
2. Why do we read applied political science papers?
We read them for the methods and how they are applied, not for their substantive findings.Slide 18
07 · Part 2

Grading: participation, poster, two papers

Self-paced coding exercises and class participation Slide 19

  • Lab files provide examples and exercises. These exercises are not graded and do not need to be submitted.
  • Class Participation — 20%: taking part in discussions of readings, methods and applications; peer feedback; questions and answers on NTU COOL or the course GitHub Issues.
  • Written assignments and posters are made in LaTeX and submitted through shared Overleaf projects.Slide 19

Final poster presentation — 25% Slides 20–21

  • W15 poster session: first a 5-minute introduction of your poster, then discussion and peer feedback; stay by your poster for the whole session to answer questions; other faculty may be invited.
  • Posters follow the PolMeth poster guidelines: clear visual design, emphasizing the research question, data and methods, main findings and implications.
  • W14 is a poster preparation workshop (format, visual presentation, 5-minute talk), counted toward class participation.Slide 20
  • Slide 21 shows four PolMeth 2025 posters as examples (Atsusaka, Lee & Lee; Jeon; Xia, Zeng, Liao & Jankin; Li); compare their research questions, evidence and visual organization.Slide 21

Two papers Slides 22–23

Midterm research design report — 20% (Slide 22)

Your own research or thesis topic, done individually. The research set up in the midterm report is completed by the final paper.

  • Abstract
  • Introduction: question and motivation
  • Literature review: positioning the research
  • Research design: data, methods, strategy
  • Preliminary results, or the planned analysis strategy
  • Feasibility, expected findings, contribution

At most 10 pages and no more than 2,500 words. Due: December 4 (W13).

Final paper — 25% (Slide 23)

Also done individually. It continues the midterm report and adds the full empirical analysis: a stronger design, robust inference, appropriate validation and sensitivity checks, followed by findings, limitations and contribution.

  • Main text: at most 4,000 words (excluding references), written as a PSRM Research Note
  • Appendix: no word or page limit (robustness, alternative specifications, validation, annotation procedures, prompts, model details, code documentation)
  • A reproducible code repository (GitHub or CodeOcean)
  • Due: TBA

Where to start? Slide 24

If you do not have a corpus in mind yet, the syllabus lists these suggested topics:

Legislatures and parties
  • Legislative behavior in Taiwan: roll-call votes, speeches, interpellations
  • Analysis of legislative speech
  • Party manifestos (cross-national or over time)
Media and rhetoric
  • Political discourse on social media
  • News framing of political issues
  • Comparative political rhetoric
  • CCP wolf-warrior diplomacy and propaganda

Pick a topic you will still be working on by the W15 poster session.Slide 24

Interactive: grading weights Slide 25

📊The five graded componentsReal course data

The grading table on slide 25 is an image; weights and deadlines are taken from the table in syllabus §8.1 (syllabus PDF p. 40) and match the percentages written on slides 19, 20, 22 and 23. The abstract's 10% appears only in the syllabus text (the text part of slide 25 gives no percentage).

Try the weighting (supplement)

Enter hypothetical scores (0–100) for each component and see how the weighted average is computed. This only demonstrates the weighting; the slides do not say how extra credit enters the final grade, and actual grades follow the instructor's announcements.

ComponentWeightDeadlineSource
Research Paper Abstract (title + at most 1,000 words)10%10/23 (W7)Syllabus §8.1; slide 25 text
Midterm Research Design Report20%12/4 (W13)Slide 22
Class Participation20%Whole semesterSlide 19
Final Poster Presentation25%12/18 (W15) in classSlide 20
Final Research Paper25%TBASlide 23
Total100%Syllabus PDF p. 40

Key points in the text of slide 25: research abstract (10/23); midterm report → final paper is one and the same original study; poster (W14 workshop, W15 presentation); coding exercises are not graded; graded assignments are submitted via Overleaf; up to 15% extra credit (chapter 08).Slide 25

Self-check

1. What is the limit for the main text of the final paper?
2,500 words / 10 pages is the midterm report; 1,000 words is the research abstract.Slide 23
2. Which component does the W14 poster workshop count toward?
It counts toward class participation.Slide 20
3. What is the rule for the lab coding exercises?
These practice exercises are ungraded; no lab submission is required.Slide 19
08 · Part 2

Bonus: up to 15% extra credit

Two kinds of extra credit Slide 26

Conference acceptance — up to 5%

APSA (early January), MPSA (November), EPSS (late December), COMPTEXT (early January), TPSA (summer), JSQPS (winter meeting late October; summer meeting July–August); PolMeth — Annual Meeting (March), Europe PolMeth (mid-to-late November), Asian PolMeth (mid-to-late October).

The slide notes that these months are typical submission deadlines, not conference 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.

If you earn both you can claim both, capped at 15%.Slide 26

Extra details from the syllabus (syllabus §8.2, syllabus PDF pp. 42–43)
  • The syllabus words the +10% journal category as “Acceptance, Revise & Resubmit, or Major/Minor Revision”.
  • The extra-credit claim deadline is TBA (announced on NTU COOL); submissions still awaiting a decision at the deadline get no provisional credit, and decisions received after the deadline do not count for this semester.
  • A conference submission that is not accepted does not qualify for conference credit.

What proof is needed? What makes a submission ineligible? Slide 27

  • Proof: the confirmation email showing the submission, and the decision letter.
  • Ineligible: submissions that violate NTU rules on academic integrity, research ethics, student conduct, authorship, copyright, data protection or generative AI use, or that violate the conference's / journal's rules; these may also be handled under NTU's relevant procedures.
  • Writing a master's thesis? You are encouraged to develop thesis-related submissions with your advisor. GIND students (Graduate Institute of National Development): co-authored thesis-related submissions must be co-written with full-time GIND faculty. For any co-authored thesis-related submission, you must be both first author and corresponding author to claim extra credit.Slide 27

Institutional and geographic names: required for every extra-credit submission Slide 28

  • Use the official name National Taiwan University in the manuscript, submission-system data, cover letter, acknowledgments, slides, posters and any public materials.
  • Do not alter, omit or downgrade the university's name, and do not use wording that disparages or misrepresents Taiwan's status; when a location is needed, use “Taipei, Taiwan” or “Taipei, Taiwan (R.O.C.)”.
  • This does not prohibit evidence-based criticism of Taiwan's politics, institutions or public policy; it governs accurate institutional and geographic description, professional conduct and non-misleading presentation.
  • If a conference, journal, submission system or editor asks you to change the wording of NTU or Taiwan, you must consult the instructor first before proceeding; discussing submission plans with the instructor in advance is also strongly recommended.Slide 28

Interactive: how much extra credit can my submission earn? Slides 26–28

🎯Extra-credit checkerBased on the rules on slides 26–28 and syllabus §8.2

This is a tool for organizing the rules, not an official review; the instructor makes the final decision.

Self-check

1. A journal submission is desk rejected. How much extra credit can it earn?
Reject or desk reject: +5% (the journal must be an SSCI-indexed political science or social science journal).Slide 26
2. A submission system asks you to change "National Taiwan University" to a different wording. What should you do?
If … asks for wording that changes NTU or Taiwan, you must consult me before proceeding.Slide 28
09 · Part 2

Generative AI, academic integrity and deadlines

Using generative AI Slide 29

This course follows NTU's guidelines on generative AI use and research integrity. AI is an assistive tool: it does not replace your judgment, nor your responsibility for what you submit.

  1. Permitted uses in assignments: conceptualisation; initial literature screening (must be verified by a human); writing and editing assistance; audiovisual and interactive components. The arguments and analysis must be your own.
  2. Disclose AI use in every submission: research abstract, midterm report, poster, final paper, extra-credit submissions. State which tool and version, what you asked it to do, how you used its output, and how you checked it. No AI used? Write: “No generative AI tools were used in the preparation of this assignment.”
  3. No statement, no acceptance: an assignment without a statement will not be accepted until a complete statement is added. Misrepresenting AI use, failing to verify AI output, fabricating sources or data through AI, or using AI to bypass learning objectives may be treated as academic misconduct.Slide 29

Interactive: AI-use disclosure statement generator Slide 29

🤖Draft disclosure statementPractice · autosaved · copyable

The fields correspond to the four items slide 29 requires. The English sentences generated are wording suggested by these notes (supplement), not an official template; check that the content is accurate before submitting.


    

Academic integrity Slide 30

  • Credit the source of any ideas, words, code, data, figures, tables and research materials that are not your own.
  • Plagiarism includes: uncited copying or close paraphrasing, unacknowledged reuse of your own earlier work, unauthorized collaboration, fabricated data or references, and AI-generated content not disclosed as required.
  • This course follows NTU policy: suspected misconduct may receive a zero for that component; serious or repeated cases may be referred to the department, college or university.Slide 30

Deadlines Slide 30

  • Deadlines are deadlines. If you cannot meet one, notify the instructor as early as possible and follow NTU's student leave procedure; in an emergency, email the instructor first.
  • Approved leave or extensions do not automatically waive the work; the instructor will arrange reasonable make-up work as appropriate.
  • Without approved leave or prior agreement: missed class activities count as absences; late work may receive no credit.Slide 30
  • From the syllabus: written assignments and extra-credit claims are due at 23:59 on the due date (Taiwan time, UTC+8) (syllabus §8.1).

Practice: is this OK?

⚖️Scenario judgmentsPractice · based on slides 29–30

The scenarios were written for these notes (supplement); the basis for judging is the rules on slides 29–30.

Not answered yet.

Self-check

1. What happens if an assignment has no AI-use statement?
No declaration, no acceptance. Even without AI you must write the sentence “No generative AI tools were used…”.Slide 29
2. Which of these is not a permitted use listed on slide 29?
The argument and the analysis stay your own.Slide 29
10 · Part 2

Respect and support, background survey, before next week

Respect and support Slide 31

  • NTU is committed to a respectful, inclusive and safe learning environment. You have the right to learn free from bullying, harassment, discrimination, sexual harassment, sexual assault, sexual bullying, stalking and other conduct that harms dignity or safety.
  • This course reads politically sensitive material. Disagreement is expected, but it must be evidence-based, professional and mutually respectful: argue with the evidence, not with the person.
  • If you experience or witness harassment, gender-related misconduct, discrimination, bullying or safety threats, you are encouraged to seek support; reports are handled under NTU's relevant procedures. You are also welcome to contact the instructor directly, who will help you find the right channel.Slide 31

Where to get help Slide 32

Complaints and reports
  • Gender Equity Education Committee complaint lines: (02) 3366-9607 / (02) 3366-9608, gender@ntu.edu.tw
  • NTU sexual harassment prevention hotline: (02) 3366-5903, leader@ntu.edu.tw
  • Or talk to the instructor first.
Support and emergencies
  • Student Counseling Center: (02) 3366-2181, my.ntu.edu.tw/counsel (an intake appointment is needed first; in an emergency you can walk in)
  • College-based counseling psychologists (walk-in): csw.ntu.edu.tw
  • Campus Security Center (24 hours): (02) 3366-9119
  • Danger to life or physical safety: 119 (medical) or 110 (police)
  • Free national 24-hour lines: mental health support line 1925; Lifeline 1995

Save the 24-hour numbers in your phone now, before you need them.Slide 32

Before you leave: background survey Slide 33

Take five minutes to fill in "Student Background and Course Expectations": your level in R, Python and text analysis; what you want from this course and what research you are working on. The instructor uses the answers to set the pace of the labs and choose examples close to your projects. (The survey QR code is on slide 33.)

Before next week Slide 34

W2: R, Python, GitHub, and Collaborative Workflow
  • Bring a laptop with a working development environment installed; you will use it every week from now on.
  • Install RStudio (R) or Positron (Python and cross-language); the setup guide will be sent before class.
  • Create a free GitHub account and install GitHub Desktop (no command-line Git needed).
  • Recommended: apply for the free GitHub Student Developer Pack with your NTU email.

W2 readings: quanteda tutorials Ch. 1 · Grimmer, Roberts & Stewart (2022) Ch. 4 (excerpt provided) · Quarto “Get Started” documentation · Privacy and AI Assistants on the Posit blog (skim).

Catching up on W1? Benoit (2020) · Grimmer & Stewart (2013) · Nielbo et al. (2024) · Egami et al. (2022).Slide 34

Note: the syllabus's W1 core readings are Benoit (2020), Grimmer & Stewart (2013) and Baden et al. (2022); Nielbo et al. (2024) and Egami et al. (2022) are listed as supplementary readings. W1/papers/ contains the first three, which chapter 12 introduces.

Self-check

1. When discussing politically sensitive material in class, what is slide 31's principle?
Disagreement is expected, but it stays evidence-based, professional, and respectful.Slide 31
11 · Supplementary lab

Supplementary lab: turning this week's slides into data (R)

Supplement (not from the lecture)

W1 has no classroom or lab R script (the first take-home lab starts in W2). This chapter is a small demo written by the TA: extract the text of week1.pdf with pdftotext -layout, treat one slide page = one document, and use quanteda to walk through the first two steps of slide 4 (corpus → representation). All output comes from actually running the code locally (R 4.5.3 (aarch64-conda-linux-gnu), quanteda 4.5.1, quanteda.textstats 0.97.2, stopwords 2.3, jsonlite 2.0.0); the full log is in tad/labs/W1/run_output.txt. These functions are formally taught in W2 and W4, so it is fine if you do not follow everything yet.

S00–S01: loading packages, reading files Slide 4

R · S00 (supplementary script run_W1.R)
# S00 載入套件
library(quanteda)
library(quanteda.textstats)
library(jsonlite)
cat("quanteda", as.character(packageVersion("quanteda")),
    "| quanteda.textstats", as.character(packageVersion("quanteda.textstats")), "\n")
R console output (run locally: R 4.5.3 (aarch64-conda-linux-gnu), quanteda 4.5.1, quanteda.textstats 0.97.2, stopwords 2.3, jsonlite 2.0.0)
> library(quanteda)

> library(quanteda.textstats)

> library(jsonlite)

> cat("quanteda", as.character(packageVersion("quanteda")),
+     "| quanteda.textstats", as.character(packageVersion("quanteda.textstats")), "\n")
quanteda 4.5.1 | quanteda.textstats 0.97.2 
R · S01 (supplementary script run_W1.R)
# S01 讀檔:一頁投影片=一份文件
raw <- paste(readLines("tad/work/W1/week1.txt", encoding = "UTF-8", warn = FALSE), collapse = "\n")
pages <- strsplit(raw, "\f", fixed = TRUE)[[1]]
pages <- pages[nchar(trimws(pages)) > 0]
pages <- gsub("\\s*\\d+/38\\s*$", "", pages)   # 去掉頁尾的「N/38」頁碼
length(pages)
part <- ifelse(seq_along(pages) <= 9, "Part 1: Text as Data",
        ifelse(seq_along(pages) <= 34, "Part 2: How This Course Works", "References"))
corp <- corpus(pages, docvars = data.frame(page = seq_along(pages), part = part))
docnames(corp) <- paste0("p", seq_along(pages))
table(docvars(corp, "part"))
R console output (run locally: R 4.5.3 (aarch64-conda-linux-gnu), quanteda 4.5.1, quanteda.textstats 0.97.2, stopwords 2.3, jsonlite 2.0.0)
> raw <- paste(readLines("tad/work/W1/week1.txt", encoding = "UTF-8", warn = FALSE), collapse = "\n")

> pages <- strsplit(raw, "\f", fixed = TRUE)[[1]]

> pages <- pages[nchar(trimws(pages)) > 0]

> pages <- gsub("\\s*\\d+/38\\s*$", "", pages)   # 去掉頁尾的「N/38」頁碼

> length(pages)
[1] 38

> part <- ifelse(seq_along(pages) <= 9, "Part 1: Text as Data",
+         ifelse(seq_along(pages) <= 34, "Part 2: How This Course Works", "References"))

> corp <- corpus(pages, docvars = data.frame(page = seq_along(pages), part = part))

> docnames(corp) <- paste0("p", seq_along(pages))

> table(docvars(corp, "part"))

         Part 1: Text as Data Part 2: How This Course Works                    References 
                            9                            25                             4 

38 pages → 38 documents. Following the structure of the slides, they fall into three groups: pages 1–9 Part 1 (page 1 is the cover, page 2 the Part 1 title page), pages 10–34 Part 2, pages 35–38 references. This decision about "what counts as a document" is exactly the researcher's choice at the corpus step of slide 4's pipeline.

S02: four preprocessing settings

R · S02 (supplementary script run_W1.R)
# S02 切字:四種前處理設定
toks_A <- tokens(corp)                                             # A 只切字
toks_B <- tokens(corp, remove_punct = TRUE, remove_numbers = TRUE,
                 remove_symbols = TRUE, remove_url = TRUE)         # B 去標點/數字/符號/網址
toks_C <- tokens_remove(tokens_tolower(toks_B), stopwords("en"))   # C 再轉小寫、去停用詞
toks_D <- tokens_wordstem(toks_C, language = "en")                 # D 再取詞幹
cfg <- list(A = toks_A, B = toks_B, C = toks_C, D = toks_D)
data.frame(setting = names(cfg),
           tokens  = sapply(cfg, function(x) sum(ntoken(x))),
           types   = sapply(cfg, function(x) nfeat(dfm(x, tolower = FALSE))))
R console output (run locally: R 4.5.3 (aarch64-conda-linux-gnu), quanteda 4.5.1, quanteda.textstats 0.97.2, stopwords 2.3, jsonlite 2.0.0)
> toks_A <- tokens(corp)                                             # A 只切字

> toks_B <- tokens(corp, remove_punct = TRUE, remove_numbers = TRUE,
+                  remove_symbols = TRUE, remove_url = TRUE)         # B 去標點/數字/符號/網址

> toks_C <- tokens_remove(tokens_tolower(toks_B), stopwords("en"))   # C 再轉小寫、去停用詞

> toks_D <- tokens_wordstem(toks_C, language = "en")                 # D 再取詞幹

> cfg <- list(A = toks_A, B = toks_B, C = toks_C, D = toks_D)

> data.frame(setting = names(cfg),
+            tokens  = sapply(cfg, function(x) sum(ntoken(x))),
+            types   = sapply(cfg, function(x) nfeat(dfm(x, tolower = FALSE))))
  setting tokens types
A       A   4499  1422
B       B   3123  1328
C       C   2215  1061
D       D   2215   896
tokens
The total number of "words" the text is split into.
types
How many distinct words there are (= the number of columns in the DFM).
A → B
Remove punctuation, numbers, symbols and URLs: 4,499 → 3,123 tokens.
B → C
Lowercase and remove English stopwords: 3,123 → 2,215 tokens; types 1,328 → 1,061.
C → D
Stemming: the token count is unchanged (2,215), but types drop from 1,061 to 896, because words like method and methods are merged into one column.

S03: document-feature matrix (DFM)

R · S03 (supplementary script run_W1.R)
# S03 文件-特徵矩陣(DFM)
dfmat <- dfm(toks_C)
dfmat
topfeatures(dfmat, 20)
R console output (run locally: R 4.5.3 (aarch64-conda-linux-gnu), quanteda 4.5.1, quanteda.textstats 0.97.2, stopwords 2.3, jsonlite 2.0.0)
> dfmat <- dfm(toks_C)

> dfmat
dfm of 38 documents x 1,061 features (2,215 occurrences, 95.50% sparsity) and 2 docvars.
    features
docs text data computational methods social science research can use yen-chieh
  p1    2    2             1       1      2       2        2   1   1         1
  p2    1    1             0       0      0       1        0   0   0         0
  p3    1    0             0       0      1       0        0   1   0         0
  p4    3    3             0       0      0       0        0   0   0         0
  p5    0    0             0       0      0       0        1   0   0         0
  p6    0    0             0       0      0       0        2   0   0         0
[ reached max_ndoc ... 32 more documents, reached max_nfeat ... 1,051 more features ]

> topfeatures(dfmat, 20)
  research  political     course       text       data    science        use submission    grimmer 
        24         24         21         19         19         19         16         16         15 
   stewart     poster    methods       week     github     social   analysis         et         al 
        15         15         14         13         13         12         12         12         12 
      code         ai 
        12         11 

38 documents × 1,061 features, with 95.50% of cells equal to 0 (sparsity). Among the most frequent words, research, political, text, data come from Part 1; course, submission, poster, github come from Part 2; grimmer, stewart, et, al come mainly from citations and the reference pages. This is a reminder: whatever "noise" is in your documents (citation formats, footers, URLs) goes straight into your data.

Interactive: slide corpus browser

🔎Tokens of the 38 slide pagesReal data: exported from R (w1_slides.json)

The tokens of each page under the four settings were actually produced by quanteda and exported from R; the totals below match R's S02 output (4,499 / 3,123 / 2,215 / 2,215 tokens).

Most frequent features on this page
Tokens on this page (in order)
Show this page's raw text (extracted with pdftotext)

S04: trimming: on how many pages must a word appear?

R · S04 (supplementary script run_W1.R)
# S04 修剪:至少出現在幾頁?
sapply(1:5, function(k) nfeat(dfm_trim(dfmat, min_docfreq = k)))
R console output (run locally: R 4.5.3 (aarch64-conda-linux-gnu), quanteda 4.5.1, quanteda.textstats 0.97.2, stopwords 2.3, jsonlite 2.0.0)
> sapply(1:5, function(k) nfeat(dfm_trim(dfmat, min_docfreq = k)))
[1] 1061  332  155   91   60
✂️min_docfreq sliderReal data: reproduces S04

1,061 → 332 → 155 → 91 → 60: merely requiring "appears on at least 2 pages" removes about 69% of the features. Most words appear on only one page, which is normal for text data (W4 formally covers dfm_trim).

S05: how do Part 1 and Part 2 differ in their words? (keyness)

R · S05 (supplementary script run_W1.R)
# S05 兩個 Part 用字的差別(keyness)
dfm_part <- dfm_group(dfm_subset(dfmat, part != "References"), groups = part)
dfm_part <- dfm_trim(dfm_part, min_termfreq = 1)   # 去掉只出現在 References 的字
nfeat(dfm_part)
key <- textstat_keyness(dfm_part, target = "Part 1: Text as Data")
head(key, 12)
tail(key, 12)
R console output (run locally: R 4.5.3 (aarch64-conda-linux-gnu), quanteda 4.5.1, quanteda.textstats 0.97.2, stopwords 2.3, jsonlite 2.0.0)
> dfm_part <- dfm_group(dfm_subset(dfmat, part != "References"), groups = part)

> dfm_part <- dfm_trim(dfm_part, min_termfreq = 1)   # 去掉只出現在 References 的字

> nfeat(dfm_part)
[1] 992

> key <- textstat_keyness(dfm_part, target = "Part 1: Text as Data")

> head(key, 12)
       feature      chi2            p n_target n_reference
1      factors 12.705822 0.0003645190        5           0
2          new 12.369396 0.0004364289        7           2
3   open-ended  9.415340 0.0021517762        4           0
4  measurement  9.188896 0.0024348771        5           1
5         text  7.441596 0.0063733351        8           6
6       answer  6.761216 0.0093160269        5           2
7   validation  6.761216 0.0093160269        5           2
8          bag  6.175408 0.0129538060        3           0
9       causal  6.175408 0.0129538060        3           0
10     example  6.175408 0.0129538060        3           0
11      graphs  6.175408 0.0129538060        3           0
12     measure  6.175408 0.0129538060        3           0

> tail(key, 12)
       feature      chi2          p n_target n_reference
981          r -1.272767 0.25924828        0           8
982    student -1.272767 0.25924828        0           8
983       work -1.272767 0.25924828        0           8
984      class -1.839177 0.17504741        0          10
985        ntu -1.839177 0.17504741        0          10
986   required -1.839177 0.17504741        0          10
987         ai -2.127666 0.14466088        0          11
988     github -2.711511 0.09962656        0          13
989       week -2.711511 0.09962656        0          13
990     poster -3.301885 0.06920044        0          15
991 submission -3.598904 0.05781768        0          16
992     course -5.097171 0.02396489        0          21
⚖️Keyness: the χ² statisticReal data: output of textstat_keyness

Right (green) = relatively more frequent in Part 1 (research content); left (red) = relatively more frequent in Part 2 (course rules). With only 9 pages against 25 and very small counts, χ² merely describes differences in word use; do not treat it as a serious statistical test.

What this small experiment shows

  • Defining a document is the researcher's decision: one page is one document, so the cover, the title page and the reference pages are all "documents" too, and they affect the most frequent words.
  • Preprocessing changes the data: for the same slides, the number of features can be 1,422, 1,328, 1,061 or 896, depending on how you process them. Baden et al. (2022, p. 6) criticize precisely that such preprocessing and modeling choices are rarely discussed or justified.
  • Crude but useful: from word counts alone, keyness separates "research content" (factors, measurement, validation, causal…) from "course rules" (course, submission, poster, github…). This is a small example of Grimmer & Stewart's first principle, "all models are wrong — but some are useful".

Self-check

1. In S02, going from setting C to D (stemming), why do tokens stay the same while types decrease?
All 2,215 tokens are still there, but 1,061 word forms are merged into 896.
2. Why do grimmer and stewart appear among the 20 most frequent features?
Whatever is in the data goes into the model; whether to keep the reference pages is a decision at the corpus stage.
12 · Wrap-up

Reading guide: Grimmer & Stewart (2013), Benoit (2020), Baden et al. (2022)

How page numbers are cited

  • All three are in W1/papers/ and are the syllabus's three core readings for W1.
  • Grimmer & Stewart (2013): typeset journal PDF; page numbers are journal pages (267–297).
  • Benoit (2020): the version in Singapore Management University's institutional repository (marked pp. 1–55 by the repository), not the SAGE print pagination (461–497); these notes write "repo PDF p. N" (including the repository cover page).
  • Baden et al. (2022): Open Access journal version (CC BY-NC-ND); page numbers are journal pages (1–18).

Grimmer & Stewart (2013). Text as Data: The Promise and Pitfalls of Automatic Content Analysis Methods for Political Texts. Political Analysis 21(3): 267–297. Slides 5, 35

Core claimAutomated text analysis greatly reduces the cost of analyzing large amounts of text, but it has pitfalls: these methods cannot replace careful thought and close reading, and they require extensive, problem-specific validation (abstract, p. 267).
Four principles (Table 1, p. 269)(1) All quantitative models of language are wrong — but some are useful; (2) quantitative methods amplify resources and augment humans rather than replace them; (3) there is no globally best method; (4) Validate, Validate, Validate.
What principle 1 meansEven linguists do not fully understand how language is generated; models should be judged by whether they accomplish useful social science tasks, not by model fit (pp. 269–270).
What principle 4 meansWhen categories are known, show that supervised methods reliably reproduce human coding; validating unsupervised methods is more indirect and combines experimental, substantive and statistical evidence; what must be avoided is "blindly using any method without a validation step" (p. 271).
The preprocessing recipeDiscard word order (bag of words) and add bigrams if needed; stemming is a crude approximation of lemmatization; the authors also stress that any step can be, and often should be, modified (p. 272).
Link to this weekSlide 5 places this paper at the start of the "Validation" phase: “the four principles — and ‘validate’”. The paper also surveys dictionaries, supervised classification, topics/clustering and scaling, which are the topics of W4–W8.

Source: W1/papers/Grimmer2013.pdf (Cambridge Core download); doi:10.1093/pan/mps028.

Benoit (2020). Text as Data: An Overview. In Curini & Franzese (eds.), The SAGE Handbook of Research Methods in Political Science and International Relations: 461–497. Slides 12, 36

Starting pointPolitical science and IR face an "embarrassment of riches" of textual data: legislative debates, manifestos, committee transcripts, speeches, lobbying documents, court opinions and laws are all recorded today, and many are easy to turn into structured data (repo PDF p. 2).
Latent vs. manifest characteristicsPolitical science often cares not about the text itself but about the unobservable latent traits it reveals, such as ideology or policy preferences; political communication often cares about manifest characteristics, i.e., the form and content of the communication itself (p. 8).
A spectrum of approaches (Table 26.1, p. 12)By degree of automation and "target of concern", from literary, qualitative and hybrid quantitative to purely quantitative. The dividing line is whether the analysis works directly on the text or first extracts features and then analyzes them. (See the PDF for how the table's columns line up; the text-extracted layout is incomplete.)
Seven stages (Table 26.2, p. 27)Select texts and define the corpus → convert to a common electronic format → define documents and units of analysis → define and refine features → convert to a quantitative matrix → analyze with appropriate statistical procedures → interpret and report.
ConclusionTreating text as data means converting it into features and analyzing patterns in those features, rather than understanding the text directly; this turns text into data that cannot be read directly, but analyzing it can yield insight through structured rules and at a scale impossible to achieve by hand. One driving force is scale (p. 46).
Link to this weekThe seven stages are essentially an expanded version of the chain on slide 4; the supplementary lab in chapter 11 does exactly stages 1–5.

Source: W1/papers/Benoit2020.pdf (Singapore Management University, Institutional Knowledge repository version); doi:10.4135/9781526486387.n29.

Baden, Pipal, Schoonvelde & van der Velden (2022). Three Gaps in Computational Text Analysis Methods for Social Sciences: A Research Agenda. Communication Methods and Measures 16(1): 1–18.

Research questionWhy is the adoption of computational text analysis methods (CTAM) in the social sciences uneven? The authors argue it is not only that social scientists lack computational skills; often choosing not to use them is reasonable (pp. 1–2).
Gap I: Technology before validityCTAM development emphasizes technical and statistical properties over operationalization and measurement validity (from p. 3). Among surveyed authors, 40% saw validity as a major concern and 35% as a minor concern; the preprocessing and modeling choices of (un)supervised CTAM are rarely discussed and almost never justified with existing methodological knowledge (p. 6).
Gap II: Specialization before integrationMost tools extract only one kind of textual meaning (e.g., a sentiment score), but social science often needs to measure several internally complex contents at once (e.g., evaluations of specific targets, frames), so tools have to be chained together (from p. 6).
Gap III: English before everythingIn top journals, 69% of text-based studies in political science and 59% in communication study only English; cross-lingual comparative studies make up under 16% in communication and 18% in political science; when a second language is added, the share using computational methods falls from 36% to 28% in communication and from 64% to 41% in political science (p. 11).
Research agendaSocial scientists are not just tool users and should take part in accumulating methodological knowledge; validation should shift from "predictive accuracy" to "how, and how convincingly, it operationalizes the concept (measurement validity)"; and integrated tools and non-English tools should be developed (from p. 14).
Link to this weekEchoes slide 5's "validation never went away"; especially relevant if you do research with Chinese-language or Taiwanese data (W13 covers multilingual data).

Source: W1/papers/Baden2022.pdf (Taylor & Francis, Open Access); doi:10.1080/19312458.2021.2015574. This paper is not on the slides' reference pages but is listed as a W1 core reading in the syllabus.

Interactive: how big is the English advantage?

🌐The numbers in Baden et al. (2022, p. 11)Real data (values reported in the paper)

The numbers are taken verbatim from the main text of Baden et al. (2022), p. 11, describing text-based studies in top journals. "Under 16%" is drawn as 16 and labeled.

Flashcards: four principles and seven stages

🃏Think first, then flipPractice

Self-check

1. Why do Grimmer & Stewart say models should be judged by "whether they accomplish useful social science tasks"?
Principle 1 (pp. 269–270).
2. In Benoit's seven stages, which stage does "what counts as a document" belong to?
Table 26.2 (repo PDF p. 27): 3. Defining documents and choosing the unit of analysis.
3. What does Baden et al.'s Gap III refer to?
English before everything (pp. 9–11).
13 · Wrap-up

Common misconceptions and glossary

Common misconceptions (click to see the explanation)

"This course will teach me transformer architectures and optimization."

No. Slide 11: this is a social science course, not a technical one; the goal is to use these methods to write your own paper.Slide 11

"The newer the method, the bigger the contribution."

Catalinac (2016) used LDA from 2003; the contribution was to political science. In application-type research, the protagonists are research design and identification.Slides 6–7

"Whatever the model outputs is the result; no need to validate."

Validation is the one requirement that has never gone away; Grimmer & Stewart's fourth principle is Validate, Validate, Validate.Slide 5

"I lose points if I don't hand in the lab exercises."

Lab exercises are not graded and do not need to be submitted. But they are your practice ground for the project.Slide 19

"If I didn't use AI, I don't need to write a declaration."

Every submission needs a declaration; if you used none, you still write “No generative AI tools were used in the preparation of this assignment.” Submissions without a declaration are not accepted.Slide 29

"Submitting to a conference earns the bonus."

The conference bonus requires acceptance; only journals have the rule that a rejected submission also earns +5%, and it must be an SSCI journal, with a confirmation letter and a decision letter.Slides 26–27

"Giving the instructor view access on Overleaf counts as submission."

Syllabus §8.1: the instructor must be invited as Editor (can edit); view-only does not count as a submission.

"An approved absence means I don't have to do the assignment."

An approved absence or extension does not automatically waive the assignment; the instructor will arrange a reasonable make-up.Slide 30

Glossary (searchable)

📖Term lookupSearch by keyword
14 · Wrap-up

Final review, research-idea worksheet, references

Final review quiz

📝14-question final reviewNot answered yet

Research-idea worksheet: warming up for the 10/23 research abstract Slides 6, 22, 24

The research abstract (10%, due 10/23) consists of a title and at most 1,000 words introducing the research you plan to develop in your midterm and final papers (syllabus §8.1). The fields below follow the workflow on slide 4, the two kinds of tasks on slide 6, and the required elements of the midterm presentation on slide 22 (the field layout is a supplement); once filled in, you can export them as Markdown for a draft.

🗒Research ideaAuto-saved · exportable

      

Reminder: attach an AI-use declaration when you submit (Chapter 09).

My progress

📌Progress overviewStored only in this browser

Only records starting with w1: are cleared; other weeks' notes are not affected.

References Slides 35–38

Works listed on slides 35–38

  • 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, 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, 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
  • 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, J., Roberts, M. E. & Stewart, B. M. (2022). Text as Data: A New Framework for Machine Learning and the Social Sciences. Princeton University Press.
  • 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
  • Jankin, S., Liao, Y.-C. & Tang, L. (2026). Folk Theories of Partisan Conflict. Working paper.
  • Jurafsky, D. & Martin, J. H. (2026). Speech and Language Processing (3rd ed., online draft). https://web.stanford.edu/~jurafsky/slp3/
  • 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, K. L. et al. (2024). Quantitative Text Analysis. Nature Reviews Methods Primers 4(1): 25. doi:10.1038/s43586-024-00302-w
  • 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
  • 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
  • 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, K. & Müller, S. (2023). Quanteda Tutorials. https://tutorials.quanteda.io

Cited on the slides but not on the reference pages

  • Catalinac, A. (2016). From Pork to Policy. The Journal of Politics 78(1): 1–18. (slide 7)

Additionally used in these notes

  • Baden, C., Pipal, C., Schoonvelde, M. & van der Velden, M. A. C. G. (2022). Three Gaps in Computational Text Analysis Methods for Social Sciences: A Research Agenda. Communication Methods and Measures 16(1): 1–18. doi:10.1080/19312458.2021.2015574 (syllabus W1 core reading)
  • NTLDEV 7191 course syllabus (NTLDEV_7191_1151.pdf): §4, §7.1 schedule, §8.1–8.2.
  • Software: quanteda, quanteda.textstats, stopwords, jsonlite (Chapter 11 supplementary lab).
These notes are based on the NTLDEV 7191 W1 slides (Yen-Chieh Liao, lecture of 2026-09-11; 38-page PDF, compiled 2026-09-20), the course syllabus NTLDEV_7191_1151.pdf, and the three papers in W1/papers/. W1 has no in-class R script; Chapter 11 is a supplementary lab, and its R output was run locally (R 4.5.3 (aarch64-conda-linux-gnu), quanteda 4.5.1, quanteda.textstats 0.97.2, stopwords 2.3, jsonlite 2.0.0). Passages and toy demos marked "Supplement (not from the lecture)" are additional explanations. Prepared 2026-11-06.
NTLDEV 7191 Text as Data · W1 interactive self-study notes · based on the 2026-09-11 lecture slides (2026-11-06)