This project aims to analyze textual data and perform sentiment analysis on the public relations campaign "Mann Ki Baat." Launched by Indian Prime Minister Narendra Modi, this radio program has been a significant part of Indian media since October 3, 2014. We use Natural Language Processing (NLP) techniques to gain insights into the content and public opinion surrounding this campaign.
-
Data Extraction
- Speeches: Scraped from government website - PM India using Beautiful Soup and Selenium.
- Tweets: Extracted with
snscrape
for the hashtag#MannKiBaat
.
-
Data Pre-processing
- Techniques for cleaning and preparing data, including handling missing values and noise.
-
Topic Modeling
- LDA: Used to identify topics in speeches with Gensim and Mallet models.
- Improvements: Frequency Filter, POS Tag Filter, and Batch Wise LDA.
-
Sentiment Analysis
- SentiWordNet: Lexicon-based approach for sentiment scoring.
- Naive Bayes & SVM: Supervised algorithms for classifying tweet sentiments.
-
Results Interpretation
- Visualization and analysis of topics and sentiment distribution.
- Data Extraction:
- Web scraping for speeches and
snscrape
for tweets.
- Web scraping for speeches and
- Data Pre-processing:
- Clean and prepare data for analysis.
- Topic Modeling:
- Apply LDA to extract topics.
- Sentiment Analysis:
- Use SentiWordNet and machine learning algorithms to analyze sentiments.
- Results Interpretation:
- Visualize and analyze topic and sentiment data.

The combined use of LDA for topic modeling and sentiment analysis provides valuable insights into the "Mann Ki Baat" campaign. The analysis shows a broad range of topics covered and public perception. Overall, the campaign has been successful, offering a platform for citizen feedback and improving government-public interaction.
-
Clone the repository:
git clone https://github.com/Anushree176/IndianPolitics_TopicModelling_SentimentAnalysis.git
-
Install dependencies:
pip install beautifulsoup4 selenium snscrape nltk gensim mallet scikit-learn matplotlib pandas
-
Download and configure the web driver for Selenium (e.g., ChromeDriver).
Contributions are welcome! Please submit a pull request or open an issue for discussion.
This project is licensed under the MIT License - see the LICENSE file for details.
- Beautiful Soup, Selenium
- snscrape
- Gensim Mallet
- Scikit-learn , NLTK
- SIES Graduate School of Technology