Source-linked AI summary

Trilingual Topic Modeling of Sri Lankan Parliamentary Debates

Himath Dhanapala, Haren Daishika, Himandhi Kuruppu, Sithija Seneviratne, Ashini Kavindya, Patalee Narasinghe, Sandeepa Weerasekara, Nisansa de Silva, Sandareka Wickramanayake

arXiv:2608.20365v1cs.CLcs.AI

TL;DR

Sri Lankan Hansards pose a topic-modeling challenge because they combine three languages, code-mixing, agglutinative morphology, and difficult PDF layouts. The paper builds an LLM-based extraction and multilingual embedding-clustering pipeline, with BiTopic as an interpretability extension. Applied to 19,553 speeches, it recovers 30 macro-topics with BCP = 0.673 whose temporal trajectories align with major national events.

  • Problem

    Trilingual, code-mixed Hansards with agglutinative morphology and complex PDFs remain difficult for standard NLP pipelines and traditional bag-of-words modeling.

  • Method

    The framework combines LLM-based extraction, multilingual embeddings, UMAP, density-based clustering, hierarchical aggregation, and an exploratory hybrid semantic-lexical BiTopic extension.

  • Results

    BCP = 0.673, and the pipeline recovered 30 macro-topics from 19,553 speeches whose temporal trajectories aligned with major national events.

  • Takeaways & Limitations

    Embedding-based modeling recovered politically meaningful thematic structure across the trilingual corpus without supervision.

  • Takeaways & Limitations

    The supervised evaluation used only 300 speeches, was heavily skewed toward Sinhala, and HDBSCAN excluded a substantial fraction of parliamentary time as noise.

Abstract

from arXiv · show

Sri Lankan parliamentary debates (Hansards) constitute a trilingual corpus of speeches in Sinhala, Tamil, and English, including code-mixed content, yet remain inaccessible to standard NLP pipelines due to layout-complex PDFs, multilingual scripts, and agglutinative morphology. We present an end-to-end framework that addresses these challenges through LLM-based text extraction followed by a multilingual embedding and density-based clustering pipeline for topic modeling. A hybrid semantic-lexical extension, BiTopic, is further explored to improve interpretability and recover speeches otherwise discarded as noise. Applied to 19,553 speeches spanning 2017-2026, the pipeline recovers 30 macro-topics achieving a cluster purity (BCP) of 0.673, whose temporal trajectories align unsupervised with major national events including the 2019 Easter Sunday attacks and the 2022 economic crisis. Traditional LDA fails on this corpus due to cross-lingual fragmentation, whereas the proposed approach successfully identifies thematic structure across all three languages without supervision.

I. INTRODUCTION

Sri Lankan Hansards offer a valuable trilingual record of political discourse, but multilingual scripts, code-mixing, agglutinative morphology, and complex PDFs challenge standard NLP pipelines. The paper addresses these challenges with an end-to-end multilingual topic-modeling framework and a BiTopic extension.

  • Sri Lankan Hansards preserve legislative debate, policy argumentation, and inter-party exchange in Sinhala, Tamil, and English.
  • Topic modeling can track parliamentary attention across policy domains and over time while supporting downstream political and discourse analyses.
  • The corpus combines trilingual and code-mixed speeches, agglutinative morphology, and dual-column PDFs with mixed-script formatting irregularities.
  • The proposed framework combines LLM-based extraction, multilingual embeddings, and clustering-based topic modeling for Sri Lankan parliamentary discourse.
  • The paper evaluates multilingual embeddings, compares clustering algorithms, and introduces BiTopic to improve interpretability and recover speeches classified as noise.

II. RELATED WORK

Prior parliamentary NLP research relies heavily on high-resource, monolingual corpora and traditional bag-of-words topic models. Recent embedding-based methods address contextual and cross-lingual representation, but robust approaches for low-resource, code-mixed settings remain needed.

  • Established corpora such as EuroParl, British Hansard, and the U.S. Congressional Record support machine translation, agenda tracking, and discourse analysis.
  • LDA is limited on agglutinative, multilingual corpora because bag-of-words representations poorly capture contextual meaning and cross-lingual equivalence.
  • Multilingual embeddings and density-based methods such as HDBSCAN offer alternatives by representing cross-lingual semantics and assigning outliers to noise.

III. DATASET

The study assembles a multi-year Sri Lankan Hansard collection directly from the official parliamentary archive. The dataset spans 2017–2026 and covers periods surrounding major national events.

  • The corpus was collected by scraping Hansard PDFs from the official parliamentary archive after an existing dataset lacked sufficient multi-year coverage.
  • The collection spans 2017–2026, including the 2019 Easter Sunday attacks, 2022 economic crisis, Aragalaya uprising, and IMF-linked restructuring.
  • The dataset is intended to support analysis of parliamentary activity across periods surrounding major political and economic events.

B. LLM-Based Extraction

The extraction process uses an LLM-based pipeline to convert difficult multilingual Hansard PDFs into substantive, speaker-attributed speeches while preserving original language and code-mixing. Evaluation and preprocessing support downstream topic modeling.

  • Standard OCR struggled with dual-column layouts and interspersed Tamil, motivating adoption of Gemini for multilingual Hansard extraction.
  • The extraction prompt selected substantive speeches, suppressed procedural noise, and mapped coherent segments to normalized speaker identifiers.
  • The pipeline preserved multilingual and code-mixed text without translation, transliteration, or normalization.
  • A manually curated subset of 300 speeches was annotated with a 16-category taxonomy for quantitative evaluation.
  • A trilingual stopword list incorporated parliamentary terminology and removed terms appearing in more than 80% of speeches, producing 1,045 terms.

IV. METHODOLOGY

The methodology evaluates multilingual embeddings and clustering suitability for Sri Lankan Hansard, after finding that LDA fragments topics by language and morphology. BGE-M3 is selected because its embedding geometry and context window support density-based clustering of long speeches.

  • LDA produced incoherent multilingual topics because word co-occurrence limited cross-lingual semantic capture and Sinhala and Tamil morphology diluted topic distributions.
  • Four multilingual embedding models were evaluated using cross-lingual semantic similarity, semantic retrieval, and anisotropy analysis on 300 speeches.
  • BGE-M3 was the viable choice for density-based clustering, combining anisotropy of 0.552 with an 8,192-token context window and under 3% truncation.
  • Multilingual e5 achieved higher STS but its anisotropy of 0.909 collapsed embeddings and its 512-token limit truncated approximately 35-40% of speeches.

C. Dimensionality Reduction

The pipeline reduces embedding dimensionality with UMAP before density-based clustering, using separate settings for clustering and visualization. Its clustering comparison exposes a purity–coverage trade-off and favors HDBSCAN for high-purity topic extraction.

  • Dimensionality Reduction: UMAP reduces 1024-dimensional embeddings to 5 dimensions while preserving local neighborhoods and producing density variations for HDBSCAN.Clustering uses n_neighbors=15, min_dist=0.0, and cosine distance; a separate 2D projection supports visualization.
  • Clustering Algorithm Comparison: HDBSCAN achieved BCP = 0.673 and Silhouette = 0.532, indicating higher cluster purity and geometric separation than the evaluated alternatives.
  • Clustering Algorithm Comparison: Partition-based methods assigned all speeches to clusters, achieving higher B-Cubed F1 through full coverage.
  • Clustering Algorithm Comparison: HDBSCAN’s 41.7% benchmark noise rate excludes procedural and formulaic speeches to improve the semantic purity of retained speeches.Noise points labeled −1 were treated as singleton clusters for B-Cubed computation.

E. Final BERTopic Pipeline

The final BERTopic pipeline combines BGE-M3 embeddings, UMAP, HDBSCAN, trilingual lexical features, and topic-representation methods, then aggregates micro-topics into higher-level macro-topics. BiTopic extends this design by fusing semantic and lexical similarities before clustering.

  • E. Final BERTopic Pipeline: The final pipeline integrates BGE-M3, UMAP, HDBSCAN, BERTopic, trilingual stopwords, CountVectorizer, and class-based TF-IDF for topic representation.KeyBERT-inspired and Maximal Marginal Relevance techniques support keyword diversity and interpretability.
  • E. Final BERTopic Pipeline: The 336 micro-topics are aggregated by Pareto-style size filtering followed by hierarchical clustering of retained topic centroids.
  • E. Final BERTopic Pipeline: BiTopic constructs dense BGE-M3 and sparse CountVectorizer representations, normalizes their cosine similarities, and fuses them before HDBSCAN clustering.
  • E. Final BERTopic Pipeline: Early fusion gives HDBSCAN one geometric field that jointly encodes semantic and lexical modalities while preserving lexical structure between institutionally distinct speeches.

V. RESULTS

The discovered macro-topics cover dominant economic and institutional concerns alongside specific political niches, and their temporal and language patterns reflect substantive parliamentary themes. Topic trajectories align with major national events without event labels, while most topics contain multiple languages.

  • Macro-Topic Discovery: Economy-related macro-topics dominate, while institutional topics cover executive power, electoral reform, and public oversight.
  • Macro-Topic Discovery: MT-17 isolates Easter Sunday attack accountability and MT-22 captures the SAITM medical education controversy, with topic sizes ranging from 89 to 1,395 speeches.
  • Temporal and Cross Lingual Patterns: Economic topics surge during the 2022 economic crisis and Aragalaya, the Easter Attacks topic rises around 2019, and healthcare topics become prominent during COVID-19.
  • Temporal and Cross Lingual Patterns: These temporal alignments emerge without event labels during training or clustering, tracking shifts in legislative attention rather than surface vocabulary repetition.
  • Temporal and Cross Lingual Patterns: Most macro-topics contain speeches from more than one language, indicating thematic rather than language-identity clustering for the majority of topics.

C. Clustering Quality and BiTopic Results

The embedding-based pipeline achieved strong clustering quality, while BiTopic sharpened semantic boundaries at a measurable coverage cost. Macro-topic analysis further indicates that multilingual embeddings recover coherent, politically meaningful structure across languages.

  • BGE-M3 provided a more suitable representation space for clustering than the alternatives, while HDBSCAN achieved the strongest cluster purity and geometric separation.
  • BiTopic Results: α = 0.85 (β = 0.15) consolidated 336 semantic micro-topics into 277 sharper clusters, while noise increased from 35.4% to 46.0%.
  • BiTopic Results: BiTopic is best viewed as an exploratory direction because the semantic BERTopic pipeline remained the stronger main model.
  • Macro-topic Results: 30 unsupervised macro-topics had temporal trajectories aligned with independently verifiable national events, recovering politically meaningful discourse boundaries without supervision.

VII. LIMITATIONS AND FUTURE WORK

The study’s evaluation and clustering choices impose important coverage and representativeness limits. Future work targets sentiment analysis within coherent topics and temporal tracking across parliamentary sessions.

  • Limitations: The supervised evaluation relies on a manually curated ground-truth subset of 300 speeches heavily skewed towards Sinhala.
  • Limitations: Topics with fewer than five speeches were filtered before evaluation, reflecting imbalance in parliamentary time allocation.
  • Limitations: 41.7% noise rejection excludes a substantial fraction of parliamentary time, creating coverage loss for research requiring complete corpus analysis.
  • Future Work: Future work will apply Aspect-Based Sentiment Analysis within coherent topic clusters to examine responses to specific policy issues.
  • Future Work: Future work will track sentiment across parliamentary sessions to study the dynamic nature of political discourse.
  • Conclusion: The framework provides a structured basis for sentiment analysis, stance detection, and longitudinal analysis of legislative attention.
Loading 2608.20365v1…