News Summarization Telegram Bot
Note: Unfortunately, this project is currently non-functional due to changes in the GNews API’s policies.
This bot is an news curation project that leverages Telegram’s platform to deliver concise, reliable, and personalized news summaries to users. By utilizing advanced technologies such as sentence embedding with S-Bert models and integrating with the Google News API, this bot revolutionizes the way people consume news.
Users can effortlessly request summaries on specific news topics through the Telegram Chatbot interface. This Bot ensures the delivery of crisp, pertinent, and trustworthy news summaries sourced exclusively from verified and trusted sources.
To ensure the utmost quality and relevance, we employed a sophisticated scoring system that evaluates content relevance, sentence novelty, and sentence position within articles. By applying a weighted average of these scores, the bot prioritizes the most informative and significant sentences in the summary.
The robustness of the project is fueled by the utilization of the NLTK library for text preprocessing, the cutting-edge capabilities of sentence transformers (S-Bert) for vectorization, and the analytical power of NumPy for score calculation. The seamless integration with the Telegram API ensures swift and convenient delivery of these curated news summaries directly to users.
Code and Resources Used
Python Version: 3.7
Packages: pandas, numpy, NLTK, math, SBERT, Gnews, Telebot
Architecture
Sentence Scoring
Suppose we have the following sentences:
A man is eating food.
A man is eating a piece of bread.
The girl is carrying a baby.
Content Relevance Score:
Sentence 1 = 0.85,
Sentence 2 = 0.84,
Sentence 3 = 0.45
Sentence Novelty Score:
Sentence 1 = 0.15,
Sentence 2 = 0.15,
Sentence 3 = 0.99
Sentence Position Score:
‘Sentence 1= 0.5,
Sentence 2 = 0.5,
Sentence 3 = 0.5
Total Score:
Sentence 1 = 0.645,
Sentence 2 = 0.641,
Sentence 3 = 0.57