IDEAS home Printed from https://ideas.repec.org/a/jbh/ijsrcs/v10y2024i5id308.html

Sentiment Analysis of Political Parties on social media: A Machine Learning and Lexicon-Based Approach

Author

Listed:
  • Swapnil P. Goje
  • Rupali H. Patil

Abstract

Social media platforms like Facebook, Twitter, Instagram, and YouTube have become central to communication and entertainment, with users sharing opinions on various topics. These opinions, often categorized as positive, negative, or neutral sentiments, provide valuable data for sentiment analysis. Our research analyzed political YouTube comments related to India’s Bhartiya Janata Party (BJP) and Indian National Congress (INC) using a combination of the AFINN lexicon and machine learning techniques. We applied feature representation methods such as Bag of Words (BoW) and Term Frequency-Inverse Document Frequency (TF-IDF), alongside five machine learning algorithms: Multinomial Naïve Bayes, Logistic Regression, Random Forest, Support Vector Machine (SVM), and K-nearest neighbor (K-NN). We aimed to determine the most efficient sentiment analysis approach by comparing the performance of these models using standard evaluation metrics. For the BJP dataset, Logistic Regression performed best with BoW, while SVM was most effective with TF-IDF. Similarly, for the INC dataset, Random Forest excelled with BoW, and SVM outperformed others with TF-IDF. The AFINN lexicon showed poor performance across both datasets, and K-NN consistently achieved lower accuracy. Our findings suggest that SVM and Random Forest are more suitable for political sentiment analysis.

Suggested Citation

  • Swapnil P. Goje & Rupali H. Patil, 2024. "Sentiment Analysis of Political Parties on social media: A Machine Learning and Lexicon-Based Approach," International Journal of Scientific Research in Computer Science, Engineering and Information Technology, International Journal of Scientific Research in Computer Science, Engineering and Information Technology, vol. 10(5), pages 233-246, October.
  • Handle: RePEc:jbh:ijsrcs:v10:y2024:i5:id:308
    DOI: 10.32628/CSEIT24105103
    Note: Article URL: https://ijsrcseit.com/home/article/view/CSEIT24105103
    as

    Download full text from publisher

    File URL: https://ijsrcseit.com/home/article/view/CSEIT24105103
    File Function: Article URL
    Download Restriction: no

    File URL: https://ijsrcseit.com/home/article/download/CSEIT24105103/CSEIT24105103
    File Function: Full text
    Download Restriction: no

    File URL: https://libkey.io/10.32628/CSEIT24105103?utm_source=ideas
    LibKey link: if access is restricted and if your library uses this service, LibKey will redirect you to where you can use your library subscription to access this item
    ---><---

    More about this item

    Keywords

    ;
    ;
    ;
    ;
    ;
    ;

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:jbh:ijsrcs:v10:y2024:i5:id:308. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    We have no bibliographic references for this item. You can help adding them by using this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: Pankaj Sharma (USA) (email available below). General contact details of provider: https://ijsrcseit.com/home .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.