Skip to content

Latest commit

 

History

55 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📰 Topic Modeling & Aspect-Based Sentiment Analysis of BBC News

Python License

🚀 Analyzing political news from the BBC using Topic Modeling and Sentiment Analysis.
We use BERTopic with all-MiniLM-L12-v2 embeddings from HuggingFace to uncover hidden topics and extract insights from the text.


📌 Project Overview

  • Data Source: BBC News articles from BigQuery (bigquery-public-data)

  • Models Used: BERTopic, all-MiniLM-L12-v2, facebook/bart-large-cnn, gemini-2.0-flash

  • Visualization: Interactive topic visualizations (barcharts, clusters, heatmaps)

  • Text Summarisation:
    - summarised very long articles to avoid BERTopic bias with facebook/bart-large-cnn - summarised articles with facebook/bart-large-cnn & gemini-2.0-flash for comparison

    • Topic-Level Summarisation: labelled topics with gemini-2.0-flash
  • Named Entity Recognition extraction of entities with RoBERTa and spaCy

  • Sentiment Analysis: Aspect-based sentiment evaluation of political entities where aspect labels = topic labels

  • Reference dataset: Hugging Face Model

  • Sentiment Labels: Positive, Negative, Neutral


Quick Setup

pip install -r requirements.txt

Get Topics & Summaries by BART

cd src/
python main.py

Get Summaries by Gemini

cd src/
python summary_llm.py

Get Named Entities

pip install -r ner_requirements.txt
cd src/
python entities.py

About

Topic Modelling, Text Summarization, and Aspect-Based Sentiment Analysis (ABSA) of BBC News with transformers and LLMs. Data are fetched from BigQuery with SQL

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages