Cleaning the Chaos: Building a Structured Corpus from Rajya Sabha Debates
This paper presents a structured, cleaned, and topic-labeled corpus of Rajya Sabha debates derived from unstructured online records, incorporating speaker identification, date matching, and LLaMA-assisted topic classification to enable computational analysis of Indian parliamentary discourse.
Original paper licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
In the vast archive of human governance, the spoken word holds a unique power. When a nation's legislators gather to debate laws, budgets, and crises, they create a living record of how a society thinks, argues, and decides its future. For researchers, these transcripts are a treasure trove, offering a way to measure the pulse of a democracy, track the rise and fall of political concerns, and understand the emotional tone of public policy. However, turning these spoken words into something a computer can study is often a monumental task. The raw records are frequently messy, buried in scanned documents, mixed between different languages, and cluttered with procedural noise that obscures the actual arguments. To make sense of this chaos, scientists use a field called natural language processing, which teaches machines to read and understand human text. By cleaning up these records and organizing them, researchers can ask big questions: What issues dominate the conversation? How do politicians feel about them? And how do these themes change over time?
A researcher at the Indian Institute of Information Technology in Nagpur has taken on this challenge specifically for the Rajya Sabha, the upper house of India's parliament. For years, the official records of these debates have been available online, but they exist as unstructured, scanned documents that are difficult to analyze. The researcher set out to build a bridge between these raw, messy files and the clean, organized data needed for modern computer analysis. Their goal was not just to store the text, but to transform it into a structured library where every speech is identified, cleaned, and tagged with its main subject. This work creates a foundational dataset that allows anyone to study the history of Indian political discourse using powerful computational tools.
The journey began with the collection of raw data. The researcher accessed the official parliamentary website and downloaded thousands of debate records spanning from 2008 to 2025. They focused on a specific period where the records were available as structured digital files, eventually gathering over 6,300 documents. These files were not simple text documents; they were scanned images of pages, meaning the text was trapped inside pictures. To free the words, the researcher used a technology called optical character recognition, which acts like a digital eye that can read letters from an image. This process converted the scanned pages into raw text, but the result was far from perfect. The extracted text was filled with errors, repeated headers, page numbers, and fragments of sentences that made no sense on their own.
Cleaning this text required a careful, step-by-step approach. The researcher had to strip away the procedural noise, such as repeated titles and administrative notes, leaving only the actual words spoken by the members of parliament. They also had to solve the puzzle of who said what. In the raw text, a speaker's name often appeared just before a colon, followed by their speech. The researcher wrote a program to find these patterns, separating the long, continuous stream of text into individual speeches. They removed honorific titles and fixed broken lines, ensuring that each speech was a coherent block of text associated with a specific person and date. The result was a massive, organized collection of nearly 95,000 individual speeches, totaling almost 9 million words, all ready for analysis.
Once the text was clean, the researcher faced the next challenge: understanding what these speeches were about. Since the data had no labels, they could not simply look up the topic. Instead, they used a hybrid approach that combined human-like reasoning with statistical grouping. First, they used a large language model, a type of advanced computer program trained on vast amounts of text, to read each speech and suggest a short description of its main theme. These suggestions were then fed into a clustering system, which grouped similar speeches together based on their meaning. The researcher found that the speeches naturally fell into about 47 distinct groups. To make these groups even clearer, they used a statistical method to extract the most common words from each group, revealing the core subjects being discussed.
The analysis revealed a clear picture of the parliamentary landscape. The topics ranged from broad themes like national security and terrorism to specific concerns about agriculture, education, and healthcare. Some clusters focused on the budget and government funding, while others dealt with social welfare and poverty. The researcher assigned clear, human-readable names to these groups, such as "Farmers and Agriculture" or "Medical and Health," creating a map of the issues that matter most to the Indian parliament. They then tracked how these topics appeared over time, observing how the focus of debates shifted with the changing seasons of the political calendar and the emergence of national events.
To understand the emotional tone of these debates, the researcher also analyzed the sentiment of the speeches. Because the text was a mix of Hindi and English, and because the speeches were often very long, a single computer model struggled to get the answer right. Instead, the researcher combined the judgments of several different models, letting them vote on whether a speech was positive, negative, or neutral. This ensemble approach provided a more reliable result. The analysis showed that the vast majority of speeches were classified as negative. This finding suggests that parliamentary discourse in India is heavily focused on criticism, problem-solving, and raising concerns, rather than on praise or positive framing. The confidence in these predictions was moderate, reflecting the inherent difficulty of interpreting formal political language that mixes two languages and often deals with complex, nuanced issues.
Finally, the researcher tested whether their new dataset was useful for future studies. They trained several computer learning models to predict the topic of a speech based solely on its text. The models were able to learn the patterns of the data with a high degree of accuracy, proving that the topics they had identified were consistent and meaningful. The best-performing models were those that could remember the flow of a sentence over time, suggesting that the context of a speech is crucial for understanding its subject. This success confirmed that the cleaned and organized dataset is a robust resource, capable of supporting deeper investigations into political behavior and policy trends.
The work done by this researcher transforms a chaotic archive of scanned pages into a structured, searchable library of human thought. By turning unstructured records into a clean dataset, they have opened the door for a new kind of political science, one that can analyze the full history of parliamentary debate with the speed and scale of a computer. While the data is not perfect, and the methods used are still evolving, the foundation they have built allows researchers to see patterns in the noise. It offers a way to watch the history of a nation's debates unfold, not just as a collection of words, but as a structured story of how a democracy argues, decides, and moves forward.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.