Siber International Journal of Education Technology
Vol. 2 No. 2 (2024): Siber International Journal of Education Technology (October 2024)

Text Mining for Sentiment Analysis of Social Media Regarding the Revision of the TNI Law Using Python by Utilizing the Lexicon Approach

Ridwan, Ridwan (Unknown)
Ali, Hapzi (Unknown)
Lubis, Hendarman (Unknown)



Article Info

Publish Date
19 Apr 2025

Abstract

This study aims to analyze public sentiment regarding the proposed revision of the Indonesian National Military (TNI) Law through social media, specifically Twitter. With the growing role of social media as a public sphere, it serves as a critical platform for expressing public opinions on national issues, including legal reforms. Using sentiment analysis, this research classifies Twitter posts into positive, neutral, or negative categories based on content related to the revision of the TNI Law. Data collection was carried out using the Twitter API (Tweepy), gathering 300 tweets using keywords related to the TNI Law revision. The analysis employed two methods: a lexicon-based approach using TextBlob and machine learning classification using Naive Bayes. The results reveal that the majority of the tweets express neutral sentiment (44.3%), followed by negative sentiment (28.3%) and positive sentiment (27.3%) based on TextBlob analysis. The Naive Bayes model demonstrated better sensitivity to negative sentiment, with 38.3% of tweets classified as negative. The findings suggest that public concern centers around the potential militarization of civil space, human rights violations, and threats to democracy. These concerns highlight the importance of transparent communication from the government regarding policy changes. Additionally, the research underscores the potential of natural language processing (NLP) and machine learning in monitoring public opinion in real time, which can serve as a valuable tool for policymakers in shaping responsive, data-driven legislation.

Copyrights © 2024






Journal Info

Abbrev

SIJET

Publisher

Subject

Education Social Sciences Other

Description

Siber International Journal of Education Technology (SIJET) is a journal in the field of educational technology that contains literature reviews, action research, case study research, and empirical findings in the disciplines of educational technology theory and practice. Topics covered include the ...