How marianassimion/challenge-desinformacao works
Fake News Detector combines a Telegram-facing service and a FastAPI prediction endpoint. Users submit text or a news URL; the API extracts URL content when needed, validates the input, fuses semantic and stylometric features, and returns a classification with confidence and metrics. The Telegram bot can additionally search trusted news sources for corroboration. A separate training path unifies labeled datasets, extracts features, trains a classifier, and saves a model. The graph follows documented and excerpted links; deployment details and unsampled integrations are not expanded.
Main entry points: app.py Prediction API · hybrid_model.py Hybrid trainer · bot.py Telegram bot · model_manager.py Model manager
Components 14
User interfaces
- Telegram bot
src/bot.py - Prediction API
src/fakenews/api/app.py
Prediction pipeline
- Article extraction
src/fakenews/processing/scraper.py - Feature extraction
src/fakenews/core/features.py - Model manager
src/fakenews/core/model_manager.py - Model configuration
src/fakenews/core/config.py - Trained classifier
models
Model training
- Hybrid trainer
src/fakenews/training/hybrid_model.py - Dataset loader
src/fakenews/processing/dataloader.py - Training datasets
data
Source verification
- Trusted-source search
src/fakenews/processing/fact_checker.py
Other components
- News submitter
- Telegram
- News search
Connections 18
- News submitter → Telegram: submits news
- Telegram → Telegram bot: delivers messages
src/bot.py - Telegram bot → Prediction API: posts text or URL
src/bot.py - News submitter → Prediction API: submits news
- Prediction API → Article extraction: extracts URL
src/fakenews/api/app.py - Prediction API → Feature extraction: extracts features
src/fakenews/api/app.py - Prediction API → Model manager: loads prediction model
src/fakenews/api/app.py - Feature extraction → Model manager: reuses loaded models
src/fakenews/core/features.py - Model manager → Model configuration: reads model settings
src/fakenews/core/model_manager.py - Model manager → Trained classifier: loads classifier
src/fakenews/core/model_manager.py - Prediction API → Telegram bot: returns prediction
src/bot.py - Telegram bot → Trusted-source search: searches sources
src/bot.py - Trusted-source search → News search: queries RSS
src/fakenews/processing/fact_checker.py - Hybrid trainer → Dataset loader: loads datasets
src/fakenews/training/hybrid_model.py - Dataset loader → Training datasets: reads labeled data
src/fakenews/processing/dataloader.py - Hybrid trainer → Feature extraction: extracts training features
src/fakenews/training/hybrid_model.py - Hybrid trainer → Model configuration: reads training settings
src/fakenews/training/hybrid_model.py - Hybrid trainer → Trained classifier: saves classifier
src/fakenews/training/hybrid_model.py