Skip to content

Anushree176/IndianPolitics_TopicModelling_SentimentAnalysis

Repository files navigation

Indian Politics: Mann Ki Baat Sentiment Analysis and Topic Modeling

Project Overview

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.

Components

  1. Data Extraction

    • Speeches: Scraped from government website - PM India using Beautiful Soup and Selenium.
    • Tweets: Extracted with snscrape for the hashtag #MannKiBaat.
  2. Data Pre-processing

    • Techniques for cleaning and preparing data, including handling missing values and noise.
  3. Topic Modeling

    • LDA: Used to identify topics in speeches with Gensim and Mallet models.
    • Improvements: Frequency Filter, POS Tag Filter, and Batch Wise LDA.
    image
  4. Sentiment Analysis

    • SentiWordNet: Lexicon-based approach for sentiment scoring.
    • Naive Bayes & SVM: Supervised algorithms for classifying tweet sentiments.
    image
  5. Results Interpretation

    • Visualization and analysis of topics and sentiment distribution.

Methodology

  1. Data Extraction:
    • Web scraping for speeches and snscrape for tweets.
  2. Data Pre-processing:
    • Clean and prepare data for analysis.
  3. Topic Modeling:
    • Apply LDA to extract topics.
  4. Sentiment Analysis:
    • Use SentiWordNet and machine learning algorithms to analyze sentiments.
  5. Results Interpretation:
    • Visualize and analyze topic and sentiment data.
image

Visualizations

image image image image

Conclusion

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.



Getting Started

  1. Clone the repository:

    git clone https://github.com/Anushree176/IndianPolitics_TopicModelling_SentimentAnalysis.git
    
  2. Install dependencies:

    pip install beautifulsoup4 selenium snscrape nltk gensim mallet scikit-learn matplotlib pandas
    
  3. Download and configure the web driver for Selenium (e.g., ChromeDriver).

Contributing

Contributions are welcome! Please submit a pull request or open an issue for discussion.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgements

  • Beautiful Soup, Selenium
  • snscrape
  • Gensim Mallet
  • Scikit-learn , NLTK
  • SIES Graduate School of Technology

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published