Skip to content

CrawfoBP23/BiasCheck

Repository files navigation

BiasCheck 🔍

Python Django Groq NewsAPI License Status Built at

In 2021, a WhatsApp message told 3 million people that vaccines contained a microchip — before any fact-check could reach them. It came too late. The belief was already alive. BiasCheck is about reversing that.

BiasCheck analyses any news article or claim in the present. First, paste a headline or search a topic and within seconds you see:

  • where it sits on the political spectrum,
  • how a news outlet frames the story across persuasion and evidence,
  • any emotional language signals detected
  • what claims it makes,
  • and a plain-English verdict on what the bias looks like and why.

Features

  • Bias detection — scores articles from -10 (far left) to +10 (far right) with political position, indicators, claims, and summary
  • Misinformation check — flags unverified claims against trusted sources
  • Emotional language detection — features engineering using scoring of evidence vs persuasion used
  • Bias quadrant chart — visualises story framing and political spectrum in a bias quadrant
  • Source filtering — excludes unverified user-generated, conspiracy-leaning, opinion-based, and no editorial oversight websites
  • Full article extraction — scrapes and reads full article content via Trafilatura
  • Multi-article analysis — analyzes all articles in parallel using async LLM requests
  • Verdict summary — calculates an overall verdict and summarises all findings across articles

How It Works

User inputs a topic or claim
        ↓
  Query sent to Google News RSS + NewsAPI
        ↓
  Exclude unverified, conspiracy-leaning,
  opinion-based, no editorial websites
        ↓
  Scrape full article content via Trafilatura
        ↓
  Each article analysed for political or emotional bias
  (left vs right) using Groq + OpenAI
        ↓
        ├── Political position, bias score,
        │   indicators, claims, summary
        │
        └── Features engineering:
            scoring of evidence vs persuasion used
        ↓
  Calculate verdict and summarise all findings
        ↓
  Visualise story framing and political spectrum
  in a bias quadrant chart
        ↓
  The user decides the views themselves

Tech Stack

Layer Technology
Backend Django
LLM Groq (GPT-OSS 20B) + OpenAI
News source Google News RSS + NewsAPI
Article extraction Trafilatura
URL decoding googlenewsdecoder
Async processing asyncio + AsyncGroq

Getting Started

Prerequisites

Installation

git clone https://github.com/CrawfoBP23/BiasCheck.git
cd biascheck
pip install -r requirements.txt
cp .env.example .env

Environment variables

NEWS_API_KEY=your_newsapi_key
GROQ_API_KEY=your_groq_api_key

Run

python manage.py migrate
python manage.py runserver

Visit http://127.0.0.1:8000


Bias Scale

Score Label
0 Not biased
1–20% Minimal bias
21–60% Moderate bias
61–80% Strong bias
81–100% Highly biased

Excluded Domains

BiasCheck automatically filters out unverified user-generated, conspiracy-leaning, opinion-based, and sites with no editorial oversight — including social media platforms, unmoderated blogs, and state propaganda outlets. Trusted sources like Reuters, AP News, BBC, and fact-checking organizations are prioritized.


What's Next

  • Browser extension to analyze articles without leaving the page
  • Cross-source comparison of the same story across outlets
  • Claim tracking across multiple articles over time
  • User history with bias trends of most-read sources
  • Multilingual support

License

MIT

About

Hack-a-thon Project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors