Text as Data

W7: Scaling Political Texts

Yen-Chieh Liao 廖彥傑

2026-10-23Fall 2026 (115-1) · National Taiwan University (GIND)
NTLDEV 7191 · Fri. 16:30–18:20 · 國發 204
Last compiled: 2026-10-30 12:33:35 (Asia/Taipei)

Calls for papers: 2027

Official calls: IPSA · EPSS · TASPAA.

This weekend in Taipei

Saturday, 31 October 2026

Official keynote poster for the 18th Annual Conference on Development Studies, 31 October 2026, at NTU's Graduate Institute of National Development.

NTU · GIND(國發所)
Keynote 10:40–12:00 · Room 302

Taipei Pride
第24屆臺灣同志遊行

Official 2026 Taiwan LGBT+ Pride banner, with rainbow paths and the date 31 October.

Taipei City Hall Plaza
Gather from 13:00 · Parade starts at 14:05

Have a good weekend. Enjoy Taiwan’s diversity and inclusive spirit.

Official event information and images: Development Studies Conference · Taiwan LGBT+ Pride.

Parliamentary origins: Ireland, 1991

An early Wordscores application: Laver & Benoit (2002).

Research choice The Irish Dáil study
Political setting October 1991 confidence debate on the Fianna Fáil–PD government
Texts 58 English-language speeches by individual legislators
Measurement target How strongly did each speaker support or oppose the government?

Discuss: what might speeches reveal beyond a final confidence vote?

Laver & Benoit (2002), Irish Political Studies 17(1): 59–73. DOI · Original article.

Parliamentary origins: Ireland, 1991

An early Wordscores application: Laver & Benoit (2002).

Research choice The Irish Dáil study
Political setting October 1991 confidence debate on the Fianna Fáil–PD government
Texts 58 English-language speeches by individual legislators
Measurement target How strongly did each speaker support or oppose the government?

Discuss: what might speeches reveal beyond a final confidence vote?

Laver & Benoit (2002), Irish Political Studies 17(1): 59–73. DOI · Original article.

Parliamentary origins: Ireland, 1991

An early Wordscores application: Laver & Benoit (2002).

Research choice The Irish Dáil study
Political setting October 1991 confidence debate on the Fianna Fáil–PD government
Texts 58 English-language speeches by individual legislators
Measurement target How strongly did each speaker support or oppose the government?

Discuss: what might speeches reveal beyond a final confidence vote?

Laver & Benoit (2002), Irish Political Studies 17(1): 59–73. DOI · Original article.

From reference speeches to positions

Step The early parliamentary design
Assign reference positions Haughey: +1. Bruton and de Rossa: −1
Score the vocabulary Learn word scores from those reference speeches
Locate other speakers Combine the scored words in each remaining speech

Interpretation: support for this government in this debate.

2002: parliamentary application.
2003: the general Wordscores article, including this debate.

Laver & Benoit (2002), pp. 61–66, reference speeches. Laver, Benoit & Garry (2003), pp. 326–328, APSR.

Text labels and continuous positions

Research task W6 connection W7 question
Assign a category Hate speech and grandstanding Which texts belong together?
Measure a degree Julia Park’s original grandstanding score (continuous) Where does a text sit on a scale?
Interpret the measure Read errors and external evidence What gives a position its meaning?

Today: Wordscores, Wordfish, Wordshoal and Latent Semantic Scaling (LSS).

Course connection: W6: Human Coding and Document Classification. Original continuous measure: Park (2021). Lecture context: Benoit (2018), pp. 3–4, 21–27.

Text labels and continuous positions

Research task W6 connection W7 question
Assign a category Hate speech and grandstanding Which texts belong together?
Measure a degree Julia Park’s original grandstanding score (continuous) Where does a text sit on a scale?
Interpret the measure Read errors and external evidence What gives a position its meaning?

Today: Wordscores, Wordfish, Wordshoal and Latent Semantic Scaling (LSS).

Course connection: W6: Human Coding and Document Classification. Original continuous measure: Park (2021). Lecture context: Benoit (2018), pp. 3–4, 21–27.

Text labels and continuous positions

Research task W6 connection W7 question
Assign a category Hate speech and grandstanding Which texts belong together?
Measure a degree Julia Park’s original grandstanding score (continuous) Where does a text sit on a scale?
Interpret the measure Read errors and external evidence What gives a position its meaning?

Today: Wordscores, Wordfish, Wordshoal and Latent Semantic Scaling (LSS).

Course connection: W6: Human Coding and Document Classification. Original continuous measure: Park (2021). Lecture context: Benoit (2018), pp. 3–4, 21–27.

Learning objectives

  • Explain the problem each method addresses and its main assumptions.
  • Connect a published application to its texts and measurement target.
  • Distinguish reference scores, latent positions and seed words.
  • Read the texts and plan independent checks before fitting a model.

Sequence: cases → method concepts
→ reading and validation → R tools and practice.

Research cases and original-study sources follow. Method selection depends on the question and available evidence.

Research cases in W7

Study Article Method Texts Teaching connection
Study 1 Laver, Benoit & Garry (2003) Wordscores Party manifestos Wordscores and reference positions
Study 2 Slapin & Proksch (2008) Wordfish German manifestos Wordfish and change over time
Study 6 Lowe & Benoit (2013) Wordfish Irish budget speeches Human judgments and model failure
Study 3 Lauderdale & Herzog (2016) Wordshoal Legislative debates Wordshoal and debate structure
Study 4 Trubowitz & Watanabe (2021) LSS News summaries LSS and geopolitical threat
Study 5 Hjorth et al. (2015) Both Danish and German manifestos External benchmarks and context

Both = Wordscores + Wordfish. Wordshoal uses Wordfish within each debate.

Wordscores: reference texts and new documents

Situation: some texts have credible positions on a defined dimension.

  • Use these documents as reference texts.
  • Learn how their words distinguish those positions.
  • Estimate positions for comparable new documents.

Example: earlier party manifestos provide references for a later election.

Laver, Benoit & Garry (2003), APSR, pp. 312–314. Lecture context: Benoit (2018), pp. 4, 17–20.

Wordscores: assumptions and scope

  • Reference scores: measure the concept we want.
  • Comparable language: words signal positions similarly.
  • Coverage: new texts contain enough scored words.
  • Transfer: word–position links carry over to new texts.

User-supplied title-page screenshot of Will Lowe's Understanding Wordscores, Political Analysis, 2008.

Will Lowe (2008)

Political Analysis 16(4): 356–371

Discuss: would a campaign manifesto be a suitable reference for a parliamentary interruption?

Model interpretation: Lowe (2008), Understanding Wordscores. Course checks: Laver, Benoit & Garry (2003), pp. 314–315; Benoit (2018), pp. 18–20. Image: user-supplied article screenshot. Discussion prompt is a course application.

Laver, Benoit and Garry: party positions

Study 1

Original APSR article heading and authors, Laver, Benoit and Garry, 2003.

Michael Laver, Kenneth Benoit and John Garry

American Political Science Review, 2003

  • Question: how can texts locate parties on policy dimensions?
  • References: British 1992 manifestos and expert scores.
  • New texts: the parties’ 1997 manifestos.

Laver, Benoit & Garry (2003), “Extracting Policy Positions from Political Texts Using Words as Data”. Lecture walkthrough: Benoit (2018), pp. 5–8.

Wordscores: interpreting estimated change

Study 1

Original Figure 1, with the 1992 reference manifestos marked by a blue arrow and outline.

Figure 1 · reference texts → words → new texts

1 · 1992 references

  • Labour: 5.35
  • Liberal Democrats: 8.21
  • Conservatives: 17.21

Economic policy:
lower = public services
higher = tax cuts

Laver, Benoit & Garry (2003), APSR, Figure 1, p. 314. Original figure, including its transformation note. Lecture walkthrough: Benoit (2018), pp. 5–8, 15. Blue arrows and outlines are course annotations.

Wordscores: interpreting estimated change

Study 1

Original Figure 1, with the scored word list in the middle marked by a blue arrow and outline.

Figure 1 · reference texts → words → new texts

2 · From texts to words

  • Learn word scores from the 1992 references.
  • Combine them using word proportions in each 1997 manifesto.

Laver, Benoit & Garry (2003), APSR, Figure 1, p. 314. Original figure, including its transformation note. Lecture walkthrough: Benoit (2018), pp. 5–8, 15. Blue arrows and outlines are course annotations.

Wordscores: interpreting estimated change

Study 1

Original Figure 1, with the transformed 1997 manifesto estimates marked by a blue arrow and outline.

Figure 1 · reference texts → words → new texts

3 · 1997 positions

  • Labour: 9.17
  • Liberal Democrats: 5.00
  • Conservatives: 17.18

Labour and the Liberal Democrats switch order.

Laver, Benoit & Garry (2003), APSR, Figure 1, p. 314. Original figure, including its transformation note. Lecture walkthrough: Benoit (2018), pp. 5–8, 15. Blue arrows and outlines are course annotations.

Wordscores: interpreting estimated change

Study 1

Original Figure 1, with its bottom note on transformed scores and standard errors marked by a blue arrow and outline.

Figure 1 · reference texts → words → new texts

4 · Read the note

  • Values are transformed.
  • Parentheses are standard errors.
  • Compare ordering; be cautious about distances.

Laver, Benoit & Garry (2003), APSR, Figure 1, p. 314. Original figure, including its transformation note. Lecture walkthrough: Benoit (2018), pp. 5–8, 15. Blue arrows and outlines are course annotations.

Wordfish: positions without reference scores

Situation: we have comparable documents but no trusted position labels.

  • Estimate a latent dimension from patterns in word counts.
  • Account for document length and the baseline frequency of words.
  • Interpret the recovered dimension using texts and external evidence.

Example: party manifestos from several elections, or speeches in one budget debate.

Slapin & Proksch (2008), AJPS. Lowe & Benoit (2013), Political Analysis. Lecture context: Benoit (2018), pp. 34–35, 37.

Wordfish: assumptions about word counts

  • Count model: word counts follow conditionally independent Poisson distributions.
  • One dimension: a document position helps explain word use after accounting for document and word baselines.
  • Political interpretation: the dimension must track the concept we care about.

Possible complications: changing topics, speaking roles, genre and historical vocabulary.

Slapin & Proksch (2008), model specification, pp. 708–710. Interpretation also follows Lowe & Benoit (2013). Lecture context: Benoit (2018), pp. 37–38, 42–43.

Wordfish: assumptions about word counts

  • Count model: word counts follow conditionally independent Poisson distributions.
  • One dimension: a document position helps explain word use after accounting for document and word baselines.
  • Political interpretation: the dimension must track the concept we care about.

Possible complications: changing topics, speaking roles, genre and historical vocabulary.

Slapin & Proksch (2008), model specification, pp. 708–710. Interpretation also follows Lowe & Benoit (2013). Lecture context: Benoit (2018), pp. 37–38, 42–43.

Wordfish: assumptions about word counts

  • Count model: word counts follow conditionally independent Poisson distributions.
  • One dimension: a document position helps explain word use after accounting for document and word baselines.
  • Political interpretation: the dimension must track the concept we care about.

Possible complications: changing topics, speaking roles, genre and historical vocabulary.

Slapin & Proksch (2008), model specification, pp. 708–710. Interpretation also follows Lowe & Benoit (2013). Lecture context: Benoit (2018), pp. 37–38, 42–43.

Slapin and Proksch: German manifestos

Study 2

Original first-page heading of Slapin and Proksch's 2008 AJPS Wordfish article.

Jonathan B. Slapin and Sven-Oliver Proksch

American Journal of Political Science, 2008

1 · Model the word counts

yij ∼ Poisson(μij)
log μij = αi + ψj + βjθi
  • yᵢⱼ: observed word count.
  • μᵢⱼ: expected word count.
  • No reference scores supplied.

Slapin & Proksch (2008), AJPS, p. 709. Course notation: i indexes a manifesto, j a word. Lecture context: Benoit (2018), pp. 37–38. Red circles and arrows are course annotations.

Slapin and Proksch: German manifestos

Study 2

Original first-page heading of Slapin and Proksch's 2008 AJPS Wordfish article.

Jonathan B. Slapin and Sven-Oliver Proksch

American Journal of Political Science, 2008

2 · Allow different baselines

yij ∼ Poisson(μij)
log μij = αi + ψj + βjθi
  • αᵢ: document baseline (partly length).
  • ψⱼ: word baseline (overall frequency).

Slapin & Proksch (2008), AJPS, p. 709. Course notation: i indexes a manifesto, j a word. Lecture context: Benoit (2018), pp. 37–38. Red circles and arrows are course annotations.

Slapin and Proksch: German manifestos

Study 2

Original first-page heading of Slapin and Proksch's 2008 AJPS Wordfish article.

Jonathan B. Slapin and Sven-Oliver Proksch

American Journal of Political Science, 2008

3 · Connect words and positions

yij ∼ Poisson(μij)
log μij = αi + ψj + βjθi
  • θᵢ: manifesto position.
  • βⱼ: word loading (log scale).
  • Fit jointly across elections.

Slapin & Proksch (2008), AJPS, p. 709. Course notation: i indexes a manifesto, j a word. Lecture context: Benoit (2018), pp. 37–38. Red circles and arrows are course annotations.

Slapin and Proksch: German manifestos

Study 2

Original first-page heading of Slapin and Proksch's 2008 AJPS Wordfish article.

Jonathan B. Slapin and Sven-Oliver Proksch

American Journal of Political Science, 2008

  • Question: how do party positions change over time?
  • Texts: German manifestos, 1990–2005.
  • Evidence: estimated positions and politically discriminating words.

Slapin & Proksch (2008), “A Scaling Model for Estimating Time-Series Party Positions from Texts”. Lecture example: Benoit (2018), p. 46.

German party positions across elections

Study 2

Slapin and Proksch Figure 1 panels A and B, showing German party positions from 1990 to 2005 for left-right and economic-policy scales.

Figure 1 · panels A and B · course annotations in red

Panel A vs. panel B

  • Compare parties within each panel.
  • Panels use different policy scopes.
  • A common time scale requires comparable word use.

Slapin & Proksch (2008), AJPS, Figure 1, p. 714. Original panels A–B, cropped from the four-panel figure. Lecture example: Benoit (2018), p. 46.

German party positions across elections

Study 2

Slapin and Proksch Figure 1 panels A and B, showing German party positions from 1990 to 2005 for left-right and economic-policy scales.

Figure 1 · panels A and B · course annotations in red

SPD: 1990–2002

  • Compare parties within each panel.
  • Panels use different policy scopes.
  • A common time scale requires comparable word use.

Slapin & Proksch (2008), AJPS, Figure 1, p. 714. Original panels A–B, cropped from the four-panel figure. Lecture example: Benoit (2018), p. 46.

Wordfish: reading the word plot

Study 2 · word parameters

Slapin and Proksch Figure 2: word weights on x and word fixed effects on y, with und high near zero loading and distinctive vocabulary on the lower sides.

Figure 2 · word parameters · red overlays

Read across, then up.

  • x: word weight (β). Farther from 0 means more separation.
  • y: word fixed effect (ψ). Higher means more common baseline use.
  • Top centre: und (“and”) is common but has little weight.
  • Lower sides: read the distinctive words in context.

Slapin & Proksch (2008), AJPS, Figure 2, p. 715. Original image supplied by the instructor.

Wordfish: reading the word plot

Study 2 · word parameters

Slapin and Proksch Figure 2: word weights on x and word fixed effects on y, with und high near zero loading and distinctive vocabulary on the lower sides.

Figure 2 · word parameters · red overlays

Read across, then up.

  • x: word weight (β). Farther from 0 means more separation.
  • y: word fixed effect (ψ). Higher means more common baseline use.
  • Top centre: und (“and”) is common but has little weight.
  • Lower sides: read the distinctive words in context.

Slapin & Proksch (2008), AJPS, Figure 2, p. 715. Original image supplied by the instructor.

Wordfish: reading the word plot

Study 2 · word parameters

Slapin and Proksch Figure 2: word weights on x and word fixed effects on y, with und high near zero loading and distinctive vocabulary on the lower sides.

Figure 2 · word parameters · red overlays

Read across, then up.

  • x: word weight (β). Farther from 0 means more separation.
  • y: word fixed effect (ψ). Higher means more common baseline use.
  • Top centre: und (“and”) is common but has little weight.
  • Lower sides: read the distinctive words in context.

Slapin & Proksch (2008), AJPS, Figure 2, p. 715. Original image supplied by the instructor.

Wordfish: reading the word plot

Study 2 · word parameters

Slapin and Proksch Figure 2: word weights on x and word fixed effects on y, with und high near zero loading and distinctive vocabulary on the lower sides.

Figure 2 · word parameters · red overlays

Read across, then up.

  • x: word weight (β). Farther from 0 means more separation.
  • y: word fixed effect (ψ). Higher means more common baseline use.
  • Top centre: und (“and”) is common but has little weight.
  • Lower sides: read the distinctive words in context.

Slapin & Proksch (2008), AJPS, Figure 2, p. 715. Original image supplied by the instructor.

Wordscores and Wordfish: strengths and limits

Aspect Wordscores Wordfish
Strength Scores new texts using reference positions. Estimates positions without supplied position scores.
Assumptions Trusted reference positions; comparable language; shared word–position links. One common dimension; conditionally independent Poisson counts; shared word effects.
Limits Reference choice matters; unseen words lack scores; shared words pull raw scores inward. Topics or roles may drive the scale; small standard errors do not establish validity.

Both need checks against the texts and independent evidence.

Wordscores and Wordfish: strengths and limits

Aspect Wordscores Wordfish
Strength Scores new texts using reference positions. Estimates positions without supplied position scores.
Assumptions Trusted reference positions; comparable language; shared word–position links. One common dimension; conditionally independent Poisson counts; shared word effects.
Limits Reference choice matters; unseen words lack scores; shared words pull raw scores inward. Topics or roles may drive the scale; small standard errors do not establish validity.

Both need checks against the texts and independent evidence.

Wordscores and Wordfish: strengths and limits

Aspect Wordscores Wordfish
Strength Scores new texts using reference positions. Estimates positions without supplied position scores.
Assumptions Trusted reference positions; comparable language; shared word–position links. One common dimension; conditionally independent Poisson counts; shared word effects.
Limits Reference choice matters; unseen words lack scores; shared words pull raw scores inward. Topics or roles may drive the scale; small standard errors do not establish validity.

Both need checks against the texts and independent evidence.

Lowe and Benoit: the Irish budget debate

Study 6

Enlarged Cambridge University Press article header showing the title Validating Estimates of Latent Traits from Textual Data Using Human Judgment as a Benchmark and authors Will Lowe and Kenneth Benoit.

Will Lowe and Kenneth Benoit

Political Analysis, 2013 · publisher page shown

  • Texts: 14 speeches on the 2010 Irish budget.
  • Debate: December 2009.
  • Benchmark: human judgments of budget support.

Lowe & Benoit (2013), Political Analysis, §3. Image: publisher page (user-provided screenshot).

Human judgments expose a model failure

Original Figure 3 comparing human direct scaling on the horizontal axis with Poisson scaling (Wordfish) on the vertical axis. The two Sinn Féin speakers are Morgan and Ó Caoláin.

Figure 3 · red arrows identify Sinn Féin

Study 6

  • Many positions broadly agree.
  • Sinn Féin: strong opposition looks too moderate in Wordfish.
  • A second political distinction complicates one dimension.

Lowe & Benoit (2013), Political Analysis, §§5–6. Figure 3 in the author manuscript, p. 32. Dimensionality background: Benoit (2018), p. 63.

Human judgments expose a model failure

Original Figure 3 comparing human direct scaling on the horizontal axis with Poisson scaling (Wordfish) on the vertical axis. The two Sinn Féin speakers are Morgan and Ó Caoláin.

Figure 3 · Sinn Féin and the gray agreement line

Study 6

  • Many positions broadly agree.
  • Sinn Féin: strong opposition looks too moderate in Wordfish.
  • A second political distinction complicates one dimension.

Lowe & Benoit (2013), Political Analysis, §§5–6. Figure 3 in the author manuscript, p. 32. Dimensionality background: Benoit (2018), p. 63.

Reading budget speeches without party labels

Study 6 · Reading exercise

Text A

We have sought to do all of this in a manner that is fair and that protects the most vulnerable.

Text B

This is a jobless and a joyless budget.

Discuss: which passage supports the budget? What else would you read before assigning a position?

Verbatim excerpts from quanteda.textmodels::data_corpus_irishbudget2010. Speaker identities follow on the next slide. Corpus documentation. Related reading example: Benoit (2018), pp. 64–66.

Budget support and speaking roles

Study 6 · Reading exercise

We have sought to do all of this in a manner that is fair and that protects the most vulnerable.

Brian Lenihan (supports the budget) · Fianna Fáil · Minister for Finance

This is a jobless and a joyless budget.

Richard Bruton (opposes the budget) · Fine Gael · opposition finance spokesperson

Interpretation: budget support, policy preferences and government responsibility can overlap in these speeches.

Irish 2010 budget corpus, Lenihan sentence 7 and Bruton sentence 6 under quanteda 4.3.1 sentence segmentation. Context: Lowe & Benoit (2013), §3. Related role example: Benoit (2018), pp. 64–66.

Gormley: one speaker, two roles

Study 6 · Lecture example

Benoit’s fuller-speech example: Green Party leader and government minister.

“As leader of the Green Party …”

The speaker sets out his party’s budget position.

“I will now comment on some specific aspects of my Department’s Estimate.”

The speaker turns to departmental business.

Discuss: which passages belong in a measure of budget support?

Benoit (2018), pp. 64–66; short excerpts from p. 65. The lecture’s text scope differs from our classroom corpus.

Gormley: suggested answer

Study 6 · Lecture example

Target: support for or opposition to the budget.

  • Keep: passages that express support for or criticism of the budget.
  • Leave out: purely administrative details with no position on the budget.
  • Why: those details can change the vocabulary and shift the score.

Decide from the content of each passage.

Reference: Benoit (2018), pp. 64–66.

Wordshoal: speakers across debates

Situation: legislators speak about different issues in different debates.

  • Compare speakers within each debate first.
  • Estimate a Wordfish position for each speaker in that debate.
  • Connect debate-specific positions through legislators who appear across debates.

Target: a common summary of expressed positions across debates.

Lauderdale & Herzog (2016), Political Analysis, §§2–3. Lecture context: Benoit (2018), pp. 47–49.

Wordshoal: speakers across debates

Situation: legislators speak about different issues in different debates.

  • Compare speakers within each debate first.
  • Estimate a Wordfish position for each speaker in that debate.
  • Connect debate-specific positions through legislators who appear across debates.

Target: a common summary of expressed positions across debates.

Lauderdale & Herzog (2016), Political Analysis, §§2–3. Lecture context: Benoit (2018), pp. 47–49.

Wordshoal: speakers across debates

Situation: legislators speak about different issues in different debates.

  • Compare speakers within each debate first.
  • Estimate a Wordfish position for each speaker in that debate.
  • Connect debate-specific positions through legislators who appear across debates.

Target: a common summary of expressed positions across debates.

Lauderdale & Herzog (2016), Political Analysis, §§2–3. Lecture context: Benoit (2018), pp. 47–49.

Wordshoal: speakers across debates

Situation: legislators speak about different issues in different debates.

  • Compare speakers within each debate first.
  • Estimate a Wordfish position for each speaker in that debate.
  • Connect debate-specific positions through legislators who appear across debates.

Target: a common summary of expressed positions across debates.

Lauderdale & Herzog (2016), Political Analysis, §§2–3. Lecture context: Benoit (2018), pp. 47–49.

Wordshoal: a shoal of Wordfish

Course schematic: three separate Wordfish fits for debates 1, 2 and 3 locate repeated speakers A, B and C. Shared speakers link the debate scales into common Wordshoal speaker positions. A group of fish illustrates the name shoal.

Course schematic · A, B and C are speakers who recur across debates.

One Wordfish fit per debate; shared speakers link the results.

Lauderdale & Herzog (2016), Political Analysis, p. 374 n. 1 (name), pp. 377–378 (two stages). Course diagram; fish illustration generated with OpenAI.

Wordshoal: assumptions across debates

  • Within debates: word-use differences provide information about relative positions.
  • Across debates: some position differences reflect a common dimension.
  • Overlap: repeated participants connect the debates.
  • Participation: selective speaking limits what observed positions represent.

The common scale summarizes positions expressed in the debates legislators joined.

Lauderdale & Herzog (2016), Political Analysis, §§2–3 and 6. The second-stage model treats missing debate positions as missing at random. Lecture context: Benoit (2018), pp. 47–49.

Wordshoal: assumptions across debates

  • Within debates: word-use differences provide information about relative positions.
  • Across debates: some position differences reflect a common dimension.
  • Overlap: repeated participants connect the debates.
  • Participation: selective speaking limits what observed positions represent.

The common scale summarizes positions expressed in the debates legislators joined.

Lauderdale & Herzog (2016), Political Analysis, §§2–3 and 6. The second-stage model treats missing debate positions as missing at random. Lecture context: Benoit (2018), pp. 47–49.

Wordshoal: assumptions across debates

  • Within debates: word-use differences provide information about relative positions.
  • Across debates: some position differences reflect a common dimension.
  • Overlap: repeated participants connect the debates.
  • Participation: selective speaking limits what observed positions represent.

The common scale summarizes positions expressed in the debates legislators joined.

Lauderdale & Herzog (2016), Political Analysis, §§2–3 and 6. The second-stage model treats missing debate positions as missing at random. Lecture context: Benoit (2018), pp. 47–49.

Wordshoal: assumptions across debates

  • Within debates: word-use differences provide information about relative positions.
  • Across debates: some position differences reflect a common dimension.
  • Overlap: repeated participants connect the debates.
  • Participation: selective speaking limits what observed positions represent.

The common scale summarizes positions expressed in the debates legislators joined.

Lauderdale & Herzog (2016), Political Analysis, §§2–3 and 6. The second-stage model treats missing debate positions as missing at random. Lecture context: Benoit (2018), pp. 47–49.

Wordshoal: assumptions across debates

  • Within debates: word-use differences provide information about relative positions.
  • Across debates: some position differences reflect a common dimension.
  • Overlap: repeated participants connect the debates.
  • Participation: selective speaking limits what observed positions represent.

The common scale summarizes positions expressed in the debates legislators joined.

Lauderdale & Herzog (2016), Political Analysis, §§2–3 and 6. The second-stage model treats missing debate positions as missing at random. Lecture context: Benoit (2018), pp. 47–49.

Lauderdale and Herzog: legislative speech

Study 3

Political Analysis advance article heading and authors, Lauderdale and Herzog, 2016.

Benjamin E. Lauderdale and Alexander Herzog

Political Analysis, 2016

  • Question: how can debates yield legislator-specific positions?
  • Ireland: 29th and 30th Dáil.
  • United States: 104th–113th Senates.

Lauderdale & Herzog (2016), “Measuring Political Positions from Legislative Speech”, §§3–5. Lecture example: Benoit (2018), pp. 47–50.

Government and opposition in the Irish Dáil

Study 3

Wordshoal Figure 1 panels a and b, comparing mean party positions with expert left-right positions and coalition status.

Figure 1 · panels a and b

  • Compare two possible interpretations.
  • The main dimension follows coalition status.
  • Left–right needs its own evidence.

Lauderdale & Herzog (2016), Political Analysis, Figure 1(a–b), advance article p. 8. Original panels cropped from the full figure. Lecture example: Benoit (2018), p. 50.

Government and opposition in the Irish Dáil

Study 3

Wordshoal Figure 1 panels a and b, comparing mean party positions with expert left-right positions and coalition status.

Figure 1 · panels a and b

  • Compare two possible interpretations.
  • The main dimension follows coalition status.
  • Left–right needs its own evidence.

Lauderdale & Herzog (2016), Political Analysis, Figure 1(a–b), advance article p. 8. Original panels cropped from the full figure. Lecture example: Benoit (2018), p. 50.

Government and opposition in the Irish Dáil

Study 3

Wordshoal Figure 1 panels a and b, comparing mean party positions with expert left-right positions and coalition status.

Figure 1 · panels a and b

  • Compare two possible interpretations.
  • The main dimension follows coalition status.
  • Left–right needs its own evidence.

Lauderdale & Herzog (2016), Political Analysis, Figure 1(a–b), advance article p. 8. Original panels cropped from the full figure. Lecture example: Benoit (2018), p. 50.

Wordshoal versus Wordfish: coalition status

Study 3 · 30th Dáil

Lauderdale and Herzog Figure 2, panels a–d. Individual legislator scores, coalition status and 95 percent intervals in the 30th Dáil.

Figure 2 · individual legislators · panels a–d · red overlays

Individual legislators

  • Wordfish: r = 0.31. Government and opposition scores overlap.
  • Wordshoal: r = 0.94. Much clearer separation in this session.
  • Bottom panels show positions and 95% intervals.

r is the correlation with coalition status.

Lauderdale & Herzog (2016), Political Analysis, Figure 2, p. 382; interpretation, p. 383. Screenshot supplied by the instructor.

Wordshoal versus Wordfish: coalition status

Study 3 · 30th Dáil

Lauderdale and Herzog Figure 2, panels a–d. Individual legislator scores, coalition status and 95 percent intervals in the 30th Dáil.

Figure 2 · individual legislators · panels a–d · red overlays

Individual legislators

  • Wordfish: r = 0.31. Government and opposition scores overlap.
  • Wordshoal: r = 0.94. Much clearer separation in this session.
  • Bottom panels show positions and 95% intervals.

r is the correlation with coalition status.

Lauderdale & Herzog (2016), Political Analysis, Figure 2, p. 382; interpretation, p. 383. Screenshot supplied by the instructor.

Debate structure and research scope

Study 3

Speaker Budget Health Foreign policy
A Speaks Speaks —
B Speaks — Speaks
C — Speaks Speaks

Teaching example: shared speakers link different debates.

A single budget debate provides no cross-debate structure. A disconnected set of speakers requires additional identifying information.

Illustrative participation table created for this course. Method connection: Lauderdale & Herzog (2016), §3. Lecture context: Benoit (2018), pp. 47–49.

LSS: seed words and a defined concept

Situation: we can name a concept’s poles but have few labelled documents.

  • Provide words that express each end of the intended dimension.
  • Learn semantic relationships from a relevant corpus.
  • Use proximity to the seeds to score words, then documents.

Hostility (+1): enemy, foe, hostile.
Friendliness (−1): ally, friend, peaceful.

Watanabe (2021), “Latent Semantic Scaling”. Seed examples from Trubowitz & Watanabe (2021), ISQ. Plural forms and other seeds omitted here.

LSS: assumptions about meaning and context

  • Seeds: words express the intended poles in this domain.
  • Semantics: co-occurrence patterns contain useful information about that distinction.
  • Aggregation: word scores provide a meaningful summary at the document level.
  • Target: polarity relates to the actor or issue we intend to measure.

Discuss: could a negative news story describe an ally sympathetically?

Watanabe (2021), CMM. LSX: seed selection and target-specific example. Discussion is a course application.

Trubowitz and Watanabe: geopolitical threat

Study 4

Original article heading and authors of The Geopolitical Threat Index, Trubowitz and Watanabe, 2021.

Peter Trubowitz and Kohei Watanabe

International Studies Quarterly, 2021

  • Texts: New York Times summaries, 1861–2017.
  • Models: Newsmap and LSS.
  • Target: reported hostile foreign military behavior.

Trubowitz & Watanabe (2021), “The Geopolitical Threat Index”. LSS method: Watanabe (2021). Image: published advance article from LSE Research Online.

Hostility words and the threat index

Study 4

GTI Figure 2 showing word polarity and frequency, including neutral and hostile or friendly terms. Friends Armies

Figure 2 · learned word polarity

  • Seeds specify hostility.
  • Countries and relevant stories require separate identification.
  • GTI aggregates the share of hostile military stories.

Trubowitz & Watanabe (2021), ISQ, Figure 2 and “Geopolitical Threat Index.” GTI is a proportion, distinct from a mean polarity score.

Hostility words and the threat index

Study 4

GTI Figure 2 showing word polarity and frequency, including neutral and hostile or friendly terms.

Figure 2 · learned word polarity

  • Seeds specify hostility.
  • Countries and relevant stories require separate identification.
  • GTI aggregates the share of hostile military stories.

Trubowitz & Watanabe (2021), ISQ, Figure 2 and “Geopolitical Threat Index.” GTI is a proportion, distinct from a mean polarity score.

Hostility words and the threat index

Study 4

GTI Figure 2 showing word polarity and frequency, including neutral and hostile or friendly terms.

Figure 2 · learned word polarity

  • Seeds specify hostility.
  • Countries and relevant stories require separate identification.
  • GTI aggregates the share of hostile military stories.

Trubowitz & Watanabe (2021), ISQ, Figure 2 and “Geopolitical Threat Index.” GTI is a proportion, distinct from a mean polarity score.

Validation depends on the level of analysis

Study 4

GTI Figure 4: human and LSS hostile-story proportions by decade, correlation 0.82, and by country, correlation 0.94.

Figure 4 · aggregate hostile-story proportions

  • By decade: r = 0.82.
  • By country: r = 0.94.
  • Individual summaries: about 59% agreement.

Check the same unit your claim is about.

Reference: Trubowitz & Watanabe (2021), ISQ, Fig. 4; fn. 18.

Validation depends on the level of analysis

Study 4

GTI Figure 4: human and LSS hostile-story proportions by decade, correlation 0.82, and by country, correlation 0.94.

Figure 4 · aggregate hostile-story proportions

  • By decade: r = 0.82.
  • By country: r = 0.94.
  • Individual summaries: about 59% agreement.

Check the same unit your claim is about.

Reference: Trubowitz & Watanabe (2021), ISQ, Fig. 4; fn. 18.

Validation depends on the level of analysis

Study 4

GTI Figure 4: human and LSS hostile-story proportions by decade, correlation 0.82, and by country, correlation 0.94.

Figure 4 · aggregate hostile-story proportions

  • By decade: r = 0.82.
  • By country: r = 0.94.
  • Individual summaries: about 59% agreement.

Check the same unit your claim is about.

Reference: Trubowitz & Watanabe (2021), ISQ, Fig. 4; fn. 18.

Supervision, units and outputs

Studies 1–4

Method Guidance supplied Structure Main output
Wordscores Reference document scores Comparable reference and new texts New document positions
Wordfish No position labels One count matrix Relative document positions
Wordshoal No position labels Speakers across debates Common speaker positions
LSS Seed words and polarity Corpus semantic relationships Word and document polarity

Next: connect speakers across debates with Wordshoal.

Wordshoal: linking debate positions

First stage: estimate a Wordfish position zᵢⱼ within each debate j.

Quantity Meaning
θᵢ Speaker’s common position
bⱼ Direction and strength of a debate’s connection
Missing zᵢⱼ The legislator did not speak in that debate

Debate scales can connect with different signs and strengths.

Teaching notation for Lauderdale & Herzog (2016), §3.2. The original second-stage model also specifies speaker precision and priors. Lecture context: Benoit (2018), pp. 47–49.

Wordshoal: linking debate positions

First stage: estimate a Wordfish position zᵢⱼ within each debate j.

Quantity Meaning
θᵢ Speaker’s common position
bⱼ Direction and strength of a debate’s connection
Missing zᵢⱼ The legislator did not speak in that debate

Debate scales can connect with different signs and strengths.

Teaching notation for Lauderdale & Herzog (2016), §3.2. The original second-stage model also specifies speaker precision and priors. Lecture context: Benoit (2018), pp. 47–49.

Wordshoal: linking debate positions

First stage: estimate a Wordfish position zᵢⱼ within each debate j.

Quantity Meaning
θᵢ Speaker’s common position
bⱼ Direction and strength of a debate’s connection
Missing zᵢⱼ The legislator did not speak in that debate

Debate scales can connect with different signs and strengths.

Teaching notation for Lauderdale & Herzog (2016), §3.2. The original second-stage model also specifies speaker precision and priors. Lecture context: Benoit (2018), pp. 47–49.

Wordshoal: align debate scales first

Constructed example: two debates encode the same ordering with opposite signs.

Speaker Debate A position Debate B position Naive average
A −1 +1 0
B 0 0 0
C +1 −1 0

A common model must align debate locations, scales and directions before interpreting shared positions.

Discuss: why does a negative debate loading not necessarily indicate an absence of common structure?

Benoit (2018), pp. 47–49; Lauderdale & Herzog (2016). This is not output from a Wordshoal fit.

LSS: semantic information and aggregation

Step Information used
Define poles Concept-specific seed words and polarity
Estimate semantic relationships Word co-occurrence, typically across sentences
Score words Similarity to the seed words in a reduced semantic space
Score documents Frequency-weighted average of word scores

Units matter: sentence-level learning can support article-level scoring and later country-year aggregation.

Watanabe (2021), CMM. LSX workflow and grouping. Country-year aggregation refers to the GTI application. Vector background: Benoit (2018), pp. 68–69.

LSS: semantic information and aggregation

Step Information used
Define poles Concept-specific seed words and polarity
Estimate semantic relationships Word co-occurrence, typically across sentences
Score words Similarity to the seed words in a reduced semantic space
Score documents Frequency-weighted average of word scores

Units matter: sentence-level learning can support article-level scoring and later country-year aggregation.

Watanabe (2021), CMM. LSX workflow and grouping. Country-year aggregation refers to the GTI application. Vector background: Benoit (2018), pp. 68–69.

LSS: semantic information and aggregation

Step Information used
Define poles Concept-specific seed words and polarity
Estimate semantic relationships Word co-occurrence, typically across sentences
Score words Similarity to the seed words in a reduced semantic space
Score documents Frequency-weighted average of word scores

Units matter: sentence-level learning can support article-level scoring and later country-year aggregation.

Watanabe (2021), CMM. LSX workflow and grouping. Country-year aggregation refers to the GTI application. Vector background: Benoit (2018), pp. 68–69.

LSS: semantic information and aggregation

Step Information used
Define poles Concept-specific seed words and polarity
Estimate semantic relationships Word co-occurrence, typically across sentences
Score words Similarity to the seed words in a reduced semantic space
Score documents Frequency-weighted average of word scores

Units matter: sentence-level learning can support article-level scoring and later country-year aggregation.

Watanabe (2021), CMM. LSX workflow and grouping. Country-year aggregation refers to the GTI application. Vector background: Benoit (2018), pp. 68–69.

LSS: semantic information and aggregation

Step Information used
Define poles Concept-specific seed words and polarity
Estimate semantic relationships Word co-occurrence, typically across sentences
Score words Similarity to the seed words in a reduced semantic space
Score documents Frequency-weighted average of word scores

Units matter: sentence-level learning can support article-level scoring and later country-year aggregation.

Watanabe (2021), CMM. LSX workflow and grouping. Country-year aggregation refers to the GTI application. Vector background: Benoit (2018), pp. 68–69.

LSS: from vectors to word polarity

Use singular value decomposition (SVD) to reduce sentence–word counts to k dimensions.

gj = (1 / |S|) ∑s∈S cos(vs, vj) ps
Quantity Meaning
vⱼ Word vector learned from sentence contexts
pₛ Researcher-assigned polarity of seed s, such as −1 or +1
gⱼ Word polarity: similarity weighted by the seed polarities

Document scores then average word polarities using token frequencies.

Watanabe (2021), “Latent Semantic Scaling,” Eqs. 1–2. Representation background: Benoit (2018), pp. 54, 68–69.

From W6 evaluation to W7 validation

Question W6 classification practice W7 scaling
What is evaluated? Predicted categories Positions on a stated dimension
What is the evidence? Reserved human labels; F1 External measures; rank agreement
What do we read? Errors and coding boundaries Surprising positions and their language

Hjorth et al. test convergence across measures. This differs from k-fold cross-validation.

Next: do Wordscores and Wordfish agree with external measures of party positions?

Course synthesis connecting W6, Hjorth et al. (2015) and Lowe & Benoit (2013). Validation framework: Benoit (2018), p. 59.

Hjorth et al.: validating party positions

Study 5

Original title, authors and journal information for Computers, Coders, and Voters, Hjorth and colleagues, Research and Politics, 2015.

Frederik Hjorth, Robert Klemmensen, Sara Hobolt, Martin Ejnar Hansen and Peter Kurrild-Klitgaard

Research & Politics, 2015

  • Question: do text scales agree with other measures of party positions?
  • Comparison: Wordscores and Wordfish.
  • Scope: 254 manifestos across 33 elections.

Hjorth et al. (2015), “Computers, Coders, and Voters”, pp. 1–2. Original article heading, CC BY-NC 3.0.

Two countries, three validation benchmarks

Study 5

Country Elections Manifestos Mean words
Denmark, 1945–2007 24 212 1,232
Germany, 1980–2009 9 42 10,306
  • Experts: published assessments of party positions.
  • Voters: mean left–right self-placement of each party’s supporters.
  • CMP RILE: a left–right index from human-coded manifestos.

Assumption to examine: do these benchmarks address the same political dimension?

Hjorth et al. (2015), pp. 2–4 and Table 1. Mean word counts rounded. CMP = Comparative Manifesto Project.

Validation differs across the two countries

Study 5

Original Table 3: mean Spearman rank correlations across elections.

Country Method CMP Experts Voters
Denmark Wordscores 0.7 0.8 0.8
Denmark Wordfish 0.2 0.2 0.1
Germany Wordscores 0.8 0.8 0.8
Germany Wordfish 0.8 0.7 0.7

Rank agreement supports an ordering; it does not establish meaningful distances.

Discuss: why might Wordfish agree with the benchmarks in one country more than the other?

Hjorth et al. (2015), Table 3, p. 7. Published correlations transcribed; estimation times omitted. These are not classification accuracies.

Why did Wordfish do better in Germany?

Study 5

Explanation What the authors report
Text length: checked Randomly shorten German manifestos to a Danish-like average. About half of Germany’s Wordfish advantage disappears.
Political vocabulary: inferred Shortened German texts still do better. The authors link the remaining advantage to more ideologically polarized language.

Evidence limit: this is the authors’ rough attribution. Vocabulary was not separately tested.

Hjorth et al. (2015), “Difference in cross-validity,” p. 4, and discussion, pp. 5–6. Approximate attribution on p. 4. Detailed shortening results are in the authors’ online appendix.

Anchors and independent validation

Evidence What it does What it leaves to check
Wordscores references Define the learned scale Performance on other texts
Wordfish dir Choose an orientation Meaning of the dimension
LSS seeds Specify a semantic direction Concept and target in context
Independent judgments Check an intended interpretation Agreement, coverage and scope

Party separation and agreement between models provide partial evidence.

Course synthesis of Lowe & Benoit (2013) and the model documentation. Judgments used to tune a measure should be separated from its final evaluation. Validation framework: Benoit (2018), p. 59.

Robustness and uncertainty

Sensitivity: replace references or seeds, change the text scope, and compare reasonable preprocessing choices.

Uncertainty: distinguish model intervals, human disagreement and variation across specifications.

Evaluation: reserve judgments that did not guide those choices.

Discuss: which choice would you vary first, and what evidence would you reserve?

Lowe & Benoit (2013), uncertainty and model assumptions. Watanabe, seed-word evaluation. Evaluation design is a course synthesis. Lecture context: Benoit (2018), pp. 60–66.

A validation plan for your research abstract

  1. Concept: what does a high score mean?
  2. Unit: which text, speaker or period receives the score?
  3. Design: what information and structure does the method require?
  4. Assumption: which condition is most likely to fail in your data?
  5. Evidence: what independent observation could reveal that failure?

Research title and abstract: due October 23, 2026, before 23:59.

Course schedule. Deadline follows the W6 announcement. Validation questions synthesize the W7 research cases. Validation framework: Benoit (2018), p. 59.

R tools for text scaling

Task Package Main interface
Prepare texts and counts quanteda Corpus, tokens and DFM
Reference-based scaling quanteda.textmodels textmodel_wordscores()
Latent count scaling quanteda.textmodels textmodel_wordfish()
Plot estimated positions quanteda.textplots textplot_scale1d()
Cross-debate scaling wordshoal textmodel_wordshoal()
Semantic scaling LSX textmodel_lss()

R practice: Wordscores and Wordfish on one budget debate.

R practice: one debate, two models

Target: support for the 2010 Irish budget.

  • Fit Wordscores and Wordfish to the same fourteen speeches.
  • Compare rankings and read the largest disagreement.
  • Replace one reference and assess sensitivity.

Work in pairs. Run S01–S08b, including lettered substeps, in one R session.
Lab HTML · Lab ZIP.

W7 run: Irish 2010 budget corpus (quanteda.textmodels). Lab HTML · Lab ZIP. Concepts: Benoit (2018), pp. 59, 64–66.

S01: Packages and the Irish corpus

Copy and run S01.

# S01: Packages and the built-in corpus
# install.packages(c("quanteda", "quanteda.textmodels",
#                    "quanteda.textplots"))
library(quanteda)
library(quanteda.textmodels)
library(quanteda.textplots)
quanteda_options(threads = 1)
options(width = 72, digits = 4)
corp_irish <- data_corpus_irishbudget2010
c(quanteda = as.character(packageVersion("quanteda")),
  textmodels = as.character(packageVersion("quanteda.textmodels")),
  textplots = as.character(packageVersion("quanteda.textplots")))
ndoc(corp_irish)

The corpus is included in quanteda.textmodels. Keep this R session open for all later steps.

W7 run: Irish 2010 budget corpus (quanteda.textmodels). Lab HTML · Lab ZIP.

S01 output: packages and documents

R console output

  quanteda textmodels  textplots 
   "4.3.1"   "0.9.10"   "0.96.1" 
[1] 14

Explanation

  • The built-in corpus contains fourteen speeches, each kept as one document.
  • Version strings identify the installed software, helping us trace differences between runs.
  • [1] marks the first printed value; 14 is the document count.

W7 run: Irish 2010 budget corpus (quanteda.textmodels). Lab HTML · Lab ZIP.

S02a: Speakers and document IDs

Copy and run S02a.

# S02a: Speakers and stable document IDs
meta <- data.frame(
  doc_id = paste0("ie_", docvars(corp_irish, "number")),
  speaker = docvars(corp_irish, "name"),
  party = docvars(corp_irish, "party"))
docnames(corp_irish) <- meta$doc_id
print(meta, row.names = FALSE)

Each row is one speech. The stable IDs keep texts, references and model results aligned.

W7 run: Irish 2010 budget corpus (quanteda.textmodels). Lab HTML · Lab ZIP.

S02a output: the fourteen speakers

R console output

 doc_id  speaker party
  ie_01  Lenihan    FF
  ie_02   Bruton    FG
  ie_03   Burton   LAB
  ie_04   Morgan    SF
  ie_05    Cowen    FF
  ie_06    Kenny    FG
  ie_07 ODonnell    FG
  ie_08  Gilmore   LAB
  ie_09  Higgins   LAB
  ie_10    Quinn   LAB
  ie_11  Gormley Green
  ie_12     Ryan Green
  ie_13    Cuffe Green
  ie_14 OCaolain    SF

Explanation

  • IDs come from speech numbers, so each score can be matched to the correct text after sorting.
  • speaker and party describe the speeches; neither model uses the party column to fit positions.

W7 run: Irish 2010 budget corpus (quanteda.textmodels). Lab HTML · Lab ZIP.

S02b: Tokenize a working copy

Copy and run S02b.

# S02b: Tokenize a working copy
toks_irish <- tokens(corp_irish, remove_punct = TRUE,
  remove_symbols = TRUE, remove_numbers = TRUE)
toks_irish <- tokens_tolower(toks_irish)
head(as.list(toks_irish)[[1]], 12)

Remove punctuation, symbols and numbers, then lowercase the working tokens. Keep the original corpus for reading.

W7 run: Irish 2010 budget corpus (quanteda.textmodels). Lab HTML · Lab ZIP.

S02b output: words from the first speech

R console output

 [1] "when"          "i"             "presented"     "the"          
 [5] "supplementary" "budget"        "to"            "this"         
 [9] "house"         "last"          "april"         "i"            

Explanation

  • The twelve words stay in speech order because this previews tokens, before counting them.
  • [1], [5], and [9] mark token positions, not frequencies.
  • Lowercase words and missing punctuation follow our cleaning choices; the later matrix also removes order.

W7 run: Irish 2010 budget corpus (quanteda.textmodels). Lab HTML · Lab ZIP.

S02c: Build the count matrix

Copy and run S02c.

# S02c: Build the common count matrix
counts <- dfm(toks_irish)
dim(counts)
any(ntoken(counts) == 0)
topfeatures(counts, 6)

Both methods start from these token counts. No TF-IDF weighting is applied.

W7 run: Irish 2010 budget corpus (quanteda.textmodels). Lab HTML · Lab ZIP. Concepts: Benoit (2018), pp. 37–38.

S02c output: counts and common words

R console output

[1]   14 4885
[1] FALSE
 the   to   of  and   in    a 
3598 1633 1537 1359 1231 1013 

Explanation

  • 14 4885 reflects fourteen speeches and their combined vocabulary; cells count word occurrences.
  • FALSE confirms cleaning left words in every speech.
  • We kept stopwords, so the remains common: 3,598 occurrences alone do not distinguish political positions.

W7 run: Irish 2010 budget corpus (quanteda.textmodels). Lab HTML · Lab ZIP. Concepts: Benoit (2018), pp. 37–38.

S03: Define the Wordscores references

Copy and run S03.

# S03: Define the Wordscores references
ref_scores <- rep(NA_real_, ndoc(counts))
names(ref_scores) <- docnames(counts)
ref_ids <- c("ie_01", "ie_02")
ref_scores[ref_ids] <- c(1, -1)
print(data.frame(speaker = meta$speaker[match(ref_ids, meta$doc_id)],
  reference = ref_scores[ref_ids]), row.names = FALSE)

Assign +1 to Lenihan and −1 to Bruton for budget support. Leave the other twelve positions unknown.

W7 run: Irish 2010 budget corpus (quanteda.textmodels). Lab HTML · Lab ZIP. Concepts: Benoit (2018), pp. 17–20.

S03 output: the reference design

R console output

 speaker reference
 Lenihan         1
  Bruton        -1

Explanation

  • We assign Lenihan +1 because he defends the budget, and Bruton −1 because he criticizes it.
  • These inputs set the intended direction; the other twelve positions stay NA because we have not supplied them.

W7 run: Irish 2010 budget corpus (quanteda.textmodels). Lab HTML · Lab ZIP. Concepts: Benoit (2018), pp. 17–20.

S04a: Fit Wordscores and read word scores

Copy and run S04a.

# S04a: Fit Wordscores and inspect word scores
ws <- textmodel_wordscores(counts, y = ref_scores, smooth = 0)
probe_words <- c("budget", "government", "tax",
                 "jobs", "fair", "recovery")
print(data.frame(word = probe_words,
  score = round(coef(ws)[probe_words], 3)), row.names = FALSE)

With smooth = 0, words must occur in the reference vocabulary to receive a score.

W7 run: Irish 2010 budget corpus (quanteda.textmodels). Lab HTML · Lab ZIP. Concepts: Benoit (2018), pp. 9–13.

S04a output: six learned word scores

R console output

       word  score
     budget -0.384
 government  0.140
        tax  0.665
       jobs  0.379
       fair -0.229
   recovery  0.403

Explanation

  • tax scores +0.665 because it is proportionally more frequent in Lenihan’s positive reference.
  • fair scores −0.229 because it is proportionally more frequent in Bruton’s negative reference.
  • Scores follow reference usage, so ordinary positive or negative sentiment does not determine their signs.

W7 run: Irish 2010 budget corpus (quanteda.textmodels). Lab HTML · Lab ZIP. Concepts: Benoit (2018), pp. 9–13.

S04b: Check the scoring vocabulary

Copy and run S04b.

# S04b: Align the scoring vocabulary and inspect coverage
ws_counts <- dfm_match(counts, features = names(coef(ws)))
ws_coverage <- ntoken(ws_counts) / ntoken(counts)
dim(ws_counts)
summary(ws_coverage)

Match the DFM to words scored by the references. Coverage is the share of each speech’s processed tokens that remain.

W7 run: Irish 2010 budget corpus (quanteda.textmodels). Lab HTML · Lab ZIP. Concepts: Benoit (2018), pp. 14, 19.

S04b output: vocabulary and token coverage

R console output

[1]   14 2131
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
  0.836   0.850   0.874   0.886   0.887   1.000 

Explanation

  • Only 2,131 of 4,885 features occur in the references and receive scores; all fourteen speeches remain.
  • Coverage is 83.6%–100%, with median 87.4%, because speeches use different amounts of scored vocabulary.
  • Repeated occurrences count toward coverage; this measures retained language, not prediction accuracy.

W7 run: Irish 2010 budget corpus (quanteda.textmodels). Lab HTML · Lab ZIP. Concepts: Benoit (2018), pp. 14, 19.

S04c: Predict raw Wordscores

Copy and run S04c.

# S04c: Predict raw Wordscores for every speech
ws_pred <- predict(ws, newdata = ws_counts, rescaling = "none")
results <- meta
results$reference <- ref_scores
results$ws_raw <- as.numeric(ws_pred)
results$coverage <- ws_coverage
print(data.frame(speaker = results$speaker, party = results$party,
  reference = results$reference,
  ws_raw = round(results$ws_raw, 3)), row.names = FALSE)

The reference column records assigned inputs. ws_raw records predictions, including reference-text rescoring.

W7 run: Irish 2010 budget corpus (quanteda.textmodels). Lab HTML · Lab ZIP. Concepts: Benoit (2018), pp. 14–15.

S04c output: reference and new speech scores

R console output

  speaker party reference ws_raw
  Lenihan    FF         1  0.339
   Bruton    FG        -1 -0.339
   Burton   LAB        NA -0.001
   Morgan    SF        NA  0.023
    Cowen    FF        NA  0.180
    Kenny    FG        NA -0.020
 ODonnell    FG        NA -0.029
  Gilmore   LAB        NA -0.012
  Higgins   LAB        NA -0.040
    Quinn   LAB        NA -0.023
  Gormley Green        NA  0.159
     Ryan Green        NA -0.012
    Cuffe Green        NA  0.003
 OCaolain    SF        NA  0.026

Explanation

  • Assigned +1 and −1 teach word scores; rescoring averages those scores, yielding Lenihan +0.339 and Bruton −0.339.
  • Shared vocabulary pulls raw averages toward the centre.
  • NA marks twelve speeches whose reference positions were not supplied; ws_raw contains their predictions.

W7 run: Irish 2010 budget corpus (quanteda.textmodels). Lab HTML · Lab ZIP. Concepts: Benoit (2018), pp. 14–15.

S04d: Plot raw Wordscores positions

Copy and run S04d.

# S04d: Plot raw Wordscores with model-based intervals
ws_plot <- predict(ws, newdata = ws_counts,
  se.fit = TRUE, rescaling = "none")
ws_labels <- paste0(meta$speaker,
  ifelse(is.na(ref_scores), "", " [reference]"))
textplot_scale1d(ws_plot, doclabels = ws_labels, sort = TRUE) +
  ggplot2::labs(x = NULL, y = "Raw Wordscores") +
  ggplot2::theme_minimal(base_size = 24)

Plot all fourteen raw predictions. The two reference speeches are labelled; their dots are rescored values, not assigned endpoints.

W7 run: Irish 2010 budget corpus (quanteda.textmodels). Lab HTML · Lab ZIP. Plot: quanteda example. Concepts: Benoit (2018), pp. 14–15.

S04d output: Wordscores positions and intervals

Fourteen raw Wordscores predictions with approximate 95 percent intervals. Lenihan and Bruton are marked as reference speeches; their predictions are about plus and minus 0.339.

Explanation

  • Reference dots near +0.339 and −0.339 show rescored word averages, rather than assigned endpoints.
  • Burton near zero reflects a word-score average; it does not establish neutral budget support.
  • Bars show approximate 95% uncertainty under the scoring method; reference-choice uncertainty is excluded.

W7 run: Irish 2010 budget corpus (quanteda.textmodels). Lab HTML · Lab ZIP. Plot: quanteda example. Concepts: Benoit (2018), pp. 14–15.

S05a: Fit Wordfish and set its direction

Copy and run S05a.

# S05a: Fit Wordfish and fix its orientation
wf_dir <- match(c("ie_02", "ie_01"), docnames(counts))
set.seed(7197)
wf <- textmodel_wordfish(counts, dir = wf_dir,
  dispersion = "poisson")
data.frame(speaker = meta$speaker[wf_dir],
  theta = round(wf$theta[wf_dir], 3))

Estimate all positions jointly. dir asks for Bruton below Lenihan, using document indices found from stable IDs.

W7 run: Irish 2010 budget corpus (quanteda.textmodels). Lab HTML · Lab ZIP. Concepts: Benoit (2018), pp. 39–41.

S05a output: the orientation check

R console output

  speaker  theta
1  Bruton -0.585
2 Lenihan  1.775

Explanation

  • Bruton (−0.585) is below Lenihan (1.775) because dir chooses that ordering.
  • The positions are estimated from counts, not fixed at −1/+1. Direction alone does not establish budget-support meaning.

W7 run: Irish 2010 budget corpus (quanteda.textmodels). Lab HTML · Lab ZIP. Concepts: Benoit (2018), pp. 39–41.

S05b: Read Wordfish positions

Copy and run S05b.

# S05b: Inspect Wordfish positions and model standard errors
results$wf_theta <- wf$theta
results$wf_se <- wf$se.theta
print(data.frame(speaker = results$speaker, party = results$party,
  theta = round(results$wf_theta, 3),
  se = round(results$wf_se, 3)), row.names = FALSE)

theta gives relative positions. se reports uncertainty under this fitted model and its assumptions.

W7 run: Irish 2010 budget corpus (quanteda.textmodels). Lab HTML · Lab ZIP. Concepts: Benoit (2018), pp. 59–61.

S05b output: positions and standard errors

R console output

  speaker party  theta    se
  Lenihan    FF  1.775 0.021
   Bruton    FG -0.585 0.029
   Burton   LAB -1.150 0.016
   Morgan    SF -0.093 0.029
    Cowen    FF  1.794 0.024
    Kenny    FG -0.789 0.026
 ODonnell    FG -0.493 0.044
  Gilmore   LAB -0.587 0.030
  Higgins   LAB -0.979 0.041
    Quinn   LAB -0.921 0.042
  Gormley Green  1.122 0.075
     Ryan Green  0.212 0.065
    Cuffe Green  0.793 0.073
 OCaolain    SF -0.098 0.039

Explanation

  • Burton has theta = −1.150 and se = 0.016; Gormley’s se = 0.075 is larger.
  • Burton’s smaller standard error gives a narrower model interval; it does not prove the scale measures budget support.

W7 run: Irish 2010 budget corpus (quanteda.textmodels). Lab HTML · Lab ZIP. Concepts: Benoit (2018), pp. 59–61.

S05c: Read Wordfish word parameters

Copy and run S05c.

# S05c: Inspect word discrimination and baseline frequency
word_id <- match(probe_words, wf$features)
print(data.frame(word = probe_words,
  beta = round(wf$beta[word_id], 3),
  psi = round(wf$psi[word_id], 3)), row.names = FALSE)

beta links word use to position. psi represents the word’s baseline frequency.

W7 run: Irish 2010 budget corpus (quanteda.textmodels). Lab HTML · Lab ZIP. Concepts: Benoit (2018), pp. 37–38.

S05c output: discrimination and baseline frequency

R console output

       word  beta   psi
     budget 0.042 2.711
 government 0.173 2.612
        tax 0.396 2.194
       jobs 0.505 1.842
       fair 0.191 0.860
   recovery 0.358 0.897

Explanation

  • Budget’s psi (2.711) describes baseline commonness; its small beta (0.042) means little change along theta.
  • Jobs’ beta (0.505) gives stronger log expected-count change per theta unit, with other effects fixed.
  • psi is not raw frequency; positive beta is not positive sentiment.

W7 run: Irish 2010 budget corpus (quanteda.textmodels). Lab HTML · Lab ZIP. Concepts: Benoit (2018), pp. 37–38.

S05d: Plot Wordfish positions

Copy and run S05d.

# S05d: Plot Wordfish positions with model-based intervals
textplot_scale1d(wf, doclabels = meta$speaker, sort = TRUE) +
  ggplot2::labs(x = NULL, y = "Wordfish position (theta)") +
  ggplot2::theme_minimal(base_size = 24)

Plot the fourteen estimated positions before comparing models. The horizontal bars use the fitted model standard errors.

W7 run: Irish 2010 budget corpus (quanteda.textmodels). Lab HTML · Lab ZIP. Plot: quanteda example. Concepts: Benoit (2018), pp. 59–61.

S05d output: Wordfish positions and intervals

Fourteen Wordfish speech positions with approximate 95 percent model intervals, sorted by theta. Burton is near minus 1.15; Cowen and Lenihan are near plus 1.79 and plus 1.78.

Explanation

  • Cowen (1.794) and Lenihan (1.775) lie to the right of Burton (−1.150) on the theta axis.
  • Approximate 95% bars use theta ± 1.96 × se; smaller standard errors produce narrower intervals.
  • Intervals describe model uncertainty; they do not establish budget-support meaning.

W7 run: Irish 2010 budget corpus (quanteda.textmodels). Lab HTML · Lab ZIP. Plot: quanteda example. Concepts: Benoit (2018), pp. 59–61.

S06a: Compare the twelve new texts

Copy and run S06a.

# S06a: Compare rankings among the twelve new texts
comparison <- results[is.na(results$reference), ]
comparison$ws_rank <- rank(comparison$ws_raw)
comparison$wf_rank <- rank(comparison$wf_theta)
comparison$gap <- abs(comparison$ws_rank - comparison$wf_rank)
comparison <- comparison[order(-comparison$gap, comparison$doc_id), ]
round(cor(comparison$ws_raw, comparison$wf_theta,
  method = "spearman"), 3)
print(head(comparison[c("speaker", "ws_rank", "wf_rank", "gap")], 6),
  row.names = FALSE)

Exclude both Wordscores references. Rank 1 is the lower end of each scale, after fixing a common orientation.

W7 run: Irish 2010 budget corpus (quanteda.textmodels). Lab HTML · Lab ZIP. Concepts: Benoit (2018), p. 59.

S06a output: ranking agreement and disagreements

R console output

[1] 0.734
  speaker ws_rank wf_rank gap
   Burton       7       1   6
 ODonnell       2       6   4
     Ryan       6       9   3
 OCaolain      10       7   3
    Cuffe       8      10   2
   Morgan       9       8   1

Explanation

  • ws_rank = 7 and wf_rank = 1 give Burton an absolute gap = 6; rank 1 means lower.
  • Spearman 0.734 summarizes twelve speeches: overall agreement can coexist with one large disagreement. It is not accuracy.

W7 run: Irish 2010 budget corpus (quanteda.textmodels). Lab HTML · Lab ZIP. Concepts: Benoit (2018), p. 59.

S06b: Plot the two scales

Copy and run S06b.

# S06b: Plot the new texts on both scales
plot(comparison$ws_raw, comparison$wf_theta,
  type = "n", xlim = c(-0.08, 0.24),
  xlab = "Wordscores (raw)", ylab = "Wordfish (theta)")
abline(h = 0, v = 0, col = "grey45", lty = 2, lwd = 1.8)
points(comparison$ws_raw, comparison$wf_theta,
  pch = 19, col = "#0271bb")
text(comparison$ws_raw[1:3], comparison$wf_theta[1:3],
  labels = comparison$speaker[1:3], pos = 4, cex = 0.85)

Each point is one of the twelve new texts. Labels identify the three largest ranking disagreements.

W7 run: Irish 2010 budget corpus (quanteda.textmodels). Lab HTML · Lab ZIP. Concepts: Benoit (2018), p. 41.

S06b output: two scales for the new texts

Actual classroom estimates: raw Wordscores and Wordfish theta for twelve new speeches, with three rank disagreements labelled.

Explanation

  • Burton is near zero in Wordscores but low in Wordfish: ranks 7 versus 1.
  • Wordscores uses two reference speeches; Wordfish fits all speeches’ word-count patterns.
  • The axes have different units. Read her argument before treating near-zero as neutral.

W7 run: Irish 2010 budget corpus (quanteda.textmodels). Lab HTML · Lab ZIP. Concepts: Benoit (2018), p. 41.

S07a: Read a ranking disagreement

Copy and run S07a.

# S07a: Identify and read the largest ranking disagreement
read_id <- comparison$doc_id[1]
print(comparison[1, c("doc_id", "speaker", "ws_rank", "wf_rank")],
  row.names = FALSE)
read_sentences <- as.character(corpus_reshape(
  corp_irish[read_id], to = "sentences"))
cat(strwrap(read_sentences[1], width = 66), sep = "\n")

Use the largest ranking gap to select a speech, then return to its original wording.

W7 run: Irish 2010 budget corpus (quanteda.textmodels). Lab HTML · Lab ZIP. Concepts: Benoit (2018), pp. 59, 64–66.

S07a output: the selected speech and its opening

R console output

 doc_id speaker ws_rank wf_rank
  ie_03  Burton       7       1
The other day, Goldman Sachs circulated a note about the Irish
budget which referred to the remarkable degree of consensus in
Ireland about the necessity for budget adjustments.

Explanation

  • Burton was selected because her model ranks differ most: Wordscores 7, Wordfish 1.
  • The consensus claim comes from a Goldman Sachs note she reports, so it does not establish her approval.

W7 run: Irish 2010 budget corpus (quanteda.textmodels). Lab HTML · Lab ZIP. Concepts: Benoit (2018), pp. 59, 64–66.

S07b: Read the surrounding argument

Copy and run S07b.

# S07b: Read more of the same speech
# In this corpus, the selected speech is Burton's. Read sentences 5-7.
cat(strwrap(paste(read_sentences[5:7], collapse = " "),
  width = 66), sep = "\n")
# For the full speech in your console:
# cat(as.character(corp_irish[read_id]))

Read sentences 5–7 in Burton’s speech. The original corpus preserves their punctuation and wording.

W7 run: Irish 2010 budget corpus (quanteda.textmodels). Lab HTML · Lab ZIP. Concepts: Benoit (2018), pp. 64–66.

S07b output: more of the same speech

R console output

One could never have imagined one's party giving such an
advantageous start to any Government. This could have been a
consensus budget as it was a classic "all jump together" moment,
an opportunity for burden sharing by everyone but the Minister
blew it. The budget is straight out of the Leona Helmsley school
of thought in which burden sharing, like taxation, is only for
the little people.

Explanation

  • A consensus budget is something Burton says the Minister failed to achieve; she criticizes burden sharing.
  • Words like consensus appear inside criticism, so a near-zero score need not mean moderate support.

W7 run: Irish 2010 budget corpus (quanteda.textmodels). Lab HTML · Lab ZIP. Concepts: Benoit (2018), pp. 64–66.

S08a: Change one reference text

Copy and run S08a.

# S08a: Replace the positive reference and refit Wordscores
ref_alt <- ref_scores
ref_alt[c("ie_01", "ie_05")] <- c(NA, 1)
ws_alt <- textmodel_wordscores(counts, y = ref_alt, smooth = 0)
ws_alt_counts <- dfm_match(counts, features = names(coef(ws_alt)))
ws_alt_pred <- predict(ws_alt, newdata = ws_alt_counts,
  rescaling = "none")
print(data.frame(speaker = meta$speaker[!is.na(ref_alt)],
  reference = ref_alt[!is.na(ref_alt)]), row.names = FALSE)

Replace Lenihan with Cowen at +1. Keep Bruton at −1 and use the same preprocessing and raw scoring rule.

W7 run: Irish 2010 budget corpus (quanteda.textmodels). Lab HTML · Lab ZIP. Concepts: Benoit (2018), pp. 17–20.

S08a output: the alternative reference design

R console output

 speaker reference
  Bruton        -1
   Cowen         1

Explanation

  • reference lists assigned inputs: Cowen +1 replaces Lenihan +1; Bruton −1 stays.
  • A different reference speech supplies different word shares, so word scores and scoring vocabulary can change despite identical endpoints.

W7 run: Irish 2010 budget corpus (quanteda.textmodels). Lab HTML · Lab ZIP. Concepts: Benoit (2018), pp. 17–20.

S08b: Compare a common set of new texts

Copy and run S08b.

# S08b: Compare ranks within the same eleven new texts
common_new <- is.na(ref_scores) & is.na(ref_alt)
sensitivity <- meta[common_new, c("doc_id", "speaker")]
sensitivity$before <- rank(ws_pred[common_new])
sensitivity$after <- rank(ws_alt_pred[common_new])
sensitivity$change <- sensitivity$after - sensitivity$before
print(sensitivity[c("speaker", "before", "after", "change")],
  row.names = FALSE)

Recalculate both rankings within the same eleven texts. Exclude Lenihan, Bruton and Cowen from this comparison.

W7 run: Irish 2010 budget corpus (quanteda.textmodels). Lab HTML · Lab ZIP. Concepts: Benoit (2018), pp. 17–20.

S08b output: sensitivity to the positive reference

R console output

  speaker before after change
   Burton      7     5     -2
   Morgan      9     8     -1
    Kenny      4     2     -2
 ODonnell      2     4      2
  Gilmore      5     6      1
  Higgins      1     1      0
    Quinn      3     3      0
  Gormley     11    11      0
     Ryan      6     9      3
    Cuffe      8    10      2
 OCaolain     10     7     -3

Explanation

  • Ryan: 6→9 (+3); O’Caolain: 10→7 (−3). These are the largest absolute changes.
  • change = after − before, with both rankings recalculated among the same eleven speeches.
  • Changing reference language changes learned word scores, so rankings can move without any policy change.

W7 run: Irish 2010 budget corpus (quanteda.textmodels). Lab HTML · Lab ZIP. Concepts: Benoit (2018), pp. 17–20.

Reporting a text-scaling analysis

Decision What to report
Corpus and representation Debate, speakers, preprocessing and counts
Wordscores Reference texts, assigned values, coverage and raw/rescaled scores
Wordfish Direction, model settings and the interpretation of theta
Assessment Ranking disagreements, passages read and sensitivity

Return to Lowe & Benoit: what independent reader judgments would test our budget-support interpretation?

W7 run: Irish 2010 budget corpus (quanteda.textmodels). Lab HTML · Lab ZIP. Concepts: Benoit (2018), p. 59.

References: text scaling foundations

Benoit, Kenneth. 2018. Scaling Text. Quants 3: Quantitative Text Analysis, Trinity College Dublin, March 23. Lecture reference for the concept walkthrough, pp. 3–27, 34–50, 54–55, 59–70.

Laver, Michael, and Kenneth Benoit. 2002. “Locating TDs in Policy Spaces: Wordscoring Dáil Speeches.” Irish Political Studies 17(1): 59–73. DOI.

Laver, Michael, Kenneth Benoit, and John Garry. 2003. “Extracting Policy Positions from Political Texts Using Words as Data.” American Political Science Review 97(2): 311–331. DOI.

Slapin, Jonathan B., and Sven-Oliver Proksch. 2008. “A Scaling Model for Estimating Time-Series Party Positions from Texts.” American Journal of Political Science 52(3): 705–722. DOI.

Lauderdale, Benjamin E., and Alexander Herzog. 2016. “Measuring Political Positions from Legislative Speech.” Political Analysis 24(3): 374–394. DOI.

References: validation and semantic scaling

Hjorth, Frederik, Robert Klemmensen, Sara Hobolt, Martin Ejnar Hansen, and Peter Kurrild-Klitgaard. 2015. “Computers, Coders, and Voters: Comparing Automated Methods for Estimating Party Positions.” Research & Politics 2(2): 1–9. DOI.

Lowe, Will, and Kenneth Benoit. 2013. “Validating Estimates of Latent Traits from Textual Data Using Human Judgment as a Benchmark.” Political Analysis 21(3): 298–313. DOI.

Watanabe, Kohei. 2021. “Latent Semantic Scaling: A Semisupervised Text Analysis Technique for New Domains and Languages.” Communication Methods and Measures 15(2): 81–102. DOI.

Trubowitz, Peter, and Kohei Watanabe. 2021. “The Geopolitical Threat Index: A Text-Based Computational Approach to Identifying Foreign Threats.” International Studies Quarterly 65(3): 852–865. DOI.

Software and source materials

Article images reproduce the original research evidence. The participation table and numerical Wordscores example are teaching illustrations. Speech excerpts retain their original wording.

Benoit lecture: PDF · Page guide.