<?xml version="1.0" encoding="UTF-8"?>
<article article-type="research-article" xml:lang="English" xmlns:xlink="http://www.w3.org/1999/xlink">
<front>
<journal-meta>
<journal-id journal-id-type="publisher">global-journal-of-computer-science-and-technology-d-neural-ai</journal-id>
<journal-title-group>
<journal-title>Global Journal of Computer Science and Technology - D: Neural &amp; AI</journal-title>
</journal-title-group>
<issn publication-format="print">0975-4350</issn>
<issn publication-format="electronic">0975-4172</issn>
<publisher><publisher-name>Global Journals Publishing Group Incorporated</publisher-name></publisher>
<self-uri xlink:href="https://globaljournals.org/journal-seo-export/jats/253420.xml" />
</journal-meta>
<article-meta>
<article-id pub-id-type="doi">10.34257/GJCST253420</article-id>
<article-id pub-id-type="publisher-id">253420</article-id>
<title-group>
<article-title>News-Based Political Sentiment Analysis for Election Out-come Verification: A BERT-Based Study of the 2024 UK General Election</article-title>
<subtitle>BERT-Based 2024 UK Election Sentiment Study</subtitle>
</title-group>
<contrib-group>
<contrib contrib-type="author"><name><surname>Asanka</surname><given-names>PPG Dinesh</given-names></name><contrib-id contrib-id-type="orcid">0000-0002-3433-5533</contrib-id><xref ref-type="aff" rid="aff1" />
</contrib>
<contrib contrib-type="author"><name><surname>Hettiarachchi</surname><given-names>Kushani Maduhansi</given-names></name><contrib-id contrib-id-type="orcid">0009-0004-1724-4244</contrib-id><xref ref-type="aff" rid="aff2" />
</contrib>
</contrib-group>
<aff id="aff1">SRI LANKA, University of Kelaniya</aff>
<aff id="aff2">SRI LANKA, Sri Lanka Institute of Information Technology</aff>
<pub-date publication-format="electronic" date-type="pub" iso-8601-date="2026-02-17">
<day>17</day>
<month>02</month>
<year>2026</year>
</pub-date>
<volume>26</volume>
<issue>1</issue>
<fpage>24</fpage>
<lpage>32</lpage>
<abstract><p>Accurate verification of general election outcomes is essential for understanding political dynamics and democratic processes. However, traditional forecasting methods such as opinion polls and voter surveys often suffer from sampling bias, delayed responses, and limited ability to capture rapid sentiment shifts. This study aims to propose and evaluate a transformer-based political sentiment analysis framework using online news articles to verify the outcome of the 2024 United Kingdom General Election. A dataset of 2,299 online news articles published between January and July 2024 was collected from seven major UK news outlets. A semi-supervised labelling approach was applied to assign sentiment polarity toward the Conservative Party and the Labour Party. To handle long-form political texts exceeding transformer token limits, articles were summarised before being processed. A fine-tuned BERT-base (uncased) model was trained to classify sentiment into positive, neutral, and negative categories. Model performance was assessed using accuracy, precision, recall, and F1-score, while temporal sentiment aggregation was conducted to compare predicted trends with the actual election outcome. The fine-tuned BERT model achieved strong sentiment classification performance, demonstrating robustness in identifying political sentiment from structured news media. Temporal analysis revealed a predominance of negative sentiment toward the Conservative Party, while the Labour Party received significantly higher levels of positive sentiment, particularly in the weeks leading up to the election. These aggregated sentiment trends successfully aligned with and verified the actual election outcome. The findings confirm that online news articles are a reliable alternative data source for political sentiment analysis and election outcome verification. Additionally, the study demonstrates the effectiveness of domain-adapted transformer-based models, such as BERT, in capturing meaningful sentiment shifts that reflect real-world electoral results.</p></abstract>
<kwd-group kwd-group-type="author-generated">
<kwd>BERT</kwd>
<kwd>Election outcome verification</kwd>
<kwd>Online news media</kwd>
<kwd>Sentiment analysis</kwd>
<kwd>Transformer-based models</kwd>
<kwd>Transformer-based models.</kwd>
</kwd-group>
<self-uri content-type="pdf" xlink:href="https://globaljournals.org:/GJCST_Volume26/bert-based-2024-uk-election-sentiment-study.pdf?v=1d845ea75ab8#" />
<self-uri content-type="html" xlink:href="https://globaljournals.org/scholarly-articles/news-based-political-sentiment-analysis-for-election-outcome-verification-a-bert-based-study-of-the-2024-uk-general-election/" />
</article-meta>
</front>
<body>
<sec>
<title>Full Text</title>
<p>Accurate verification of general election outcomes is essential for understanding political dynamics and democratic processes. However, traditional forecasting methods such as opinion polls and voter surveys often suffer from sampling bias, delayed responses, and limited ability to capture rapid sentiment shifts. This study aims to propose and evaluate a transformer-based political sentiment analysis framework using online news articles to verify the outcome of the 2024 United Kingdom General Election. A dataset of 2,299 online news articles published between January and July 2024 was collected from seven major UK news outlets. A semi-supervised labelling approach was applied to assign sentiment polarity toward the Conservative Party and the Labour Party. To handle long-form political texts exceeding transformer token limits, articles were summarised before being processed. A fine-tuned BERT-base (uncased) model was trained to classify sentiment into positive, neutral, and negative categories. Model performance was assessed using accuracy, precision, recall, and F1-score, while temporal sentiment aggregation was conducted to compare predicted trends with the actual election outcome. The fine-tuned BERT model achieved strong sentiment classification performance, demonstrating robustness in identifying political sentiment from structured news media. Temporal analysis revealed a predominance of negative sentiment toward the Conservative Party, while the Labour Party received significantly higher levels of positive sentiment, particularly in the weeks leading up to the election. These aggregated sentiment trends successfully aligned with and verified the actual election outcome. The findings confirm that online news articles are a reliable alternative data source for political sentiment analysis and election outcome verification. Additionally, the study demonstrates the effectiveness of domain-adapted transformer-based models, such as BERT, in capturing meaningful sentiment shifts that reflect real-world electoral results.</p>
</sec>
</body>
</article>