A simple Telegram bot for news aggregation, filtering, and neutralization from various sources.
- Multi-language support (English, Russian)
- News aggregation from multiple sources (RBC and others)
- News categorization (Economy, Politics, Society, etc.)
- Category-based news filtering
- Telegram interface
- Real-time news notifications
- News neutralization:
- Bias removal
- Emotional coloring reduction
- Fact-focused presentation
bot/
├── locales/ # Localization files
│ ├── en.json # English translations
│ └── ru.json # Russian translations
├── rss/ # RSS parsers
│ ├── abstract.py # Abstract RSS parser class
│ └── rbc.py # RBC parser implementation
├── lm/ # Language models
├── controller.py # Bot controller
├── service.py # Business logic
├── repository.py # Database operations
├── model.py # Data models
├── strings.py # String constants
└── database.py # Database configuration
make_neutral.py- Transforms news text to neutral toneclassify_news.py- Categorizes news articles
-
Move
bot/.env.exampleto.envand set the environment variables: -
Run the docker compose:
docker-compose -f bot/docker-compose.yaml up -dThe bot supports multiple languages through JSON-based localization files located in the locales/ directory.
To add a new language:
- Create
<language-code>.jsoninlocales/ - Copy the structure from an existing language file
- Translate all strings
To implement a new news source:
- Create a new class in
rss/ - Inherit from
AbstractRSSParser - Implement required methods
- Add the source to
strings.py - Update localization files