🚀 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.
-
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 withfacebook/bart-large-cnn- summarised articles withfacebook/bart-large-cnn&gemini-2.0-flashfor comparison- Topic-Level Summarisation: labelled topics with
gemini-2.0-flash
- Topic-Level Summarisation: labelled topics with
-
Named Entity Recognition extraction of entities with RoBERTa and spaCy
-
Sentiment Analysis: Aspect-based sentiment evaluation of political entities where aspect labels = topic labels
-
Sentiment Labels: Positive, Negative, Neutral
pip install -r requirements.txt
cd src/
python main.py
cd src/
python summary_llm.py
pip install -r ner_requirements.txt
cd src/
python entities.py