chrisricard.com
Archive aisle lined with shelves of case boxes and card-catalog drawers

Correlating Language Model Clusters of News Agencies and Political Campaigns With Political Biases

July 17, 2026 · 248 KB

A 2011 Stanford CS224N student project builds language models from eight news sites and nine campaign sites and finds same-party candidates cluster together, but no sign of news agency bias.

Overview

Can simple statistical features of text reveal political leanings? Yaron Friedman and Issao Fujiwara tested the idea in their final project for CS224N, Stanford's natural language processing course, in winter 2011. They gathered English text from eight major news agencies' websites and nine politicians' campaign sites, built language models from each and compared them.

Method

Finding no ready-made corpora, the students crawled the sites themselves. After trying the Heritrix and WebSPHINX crawlers, they had most success with the Unix tool wget. They then stripped the HTML with the BeautifulSoup library and a set of rules to remove navigation text, copyright notices, ads, comments and social media posts.

For each corpus they trained unigram, bigram and trigram language models. They then measured how well each model predicted every other corpus, using perplexity, and grouped the results with clustering techniques. A further method picked out the words that best distinguished one corpus from another.

Findings

The Obama and Biden campaign texts consistently clustered together, and candidates of the same party showed significant clustering. The data did not form two clear party clusters. The students found no evidence that any news agency was biased towards either party, since candidates' texts fitted all the news models fairly evenly. They suggest issue identification and sentiment analysis as next steps.

Why It Matters

The project is a small, early attempt to detect political alignment from word statistics alone. Its null result on media bias is a useful caution against reading too much into simple text measures.

Page 1 of Correlating Language Model Clusters of News Agencies and Political Campaigns With Political Biases
Page 1 · click to open the full PDF
Open full PDF (248 KB) ↗

More from Media Broadcast

See all 105 in Media Broadcast →