Sentiment Analysis of Social Media Posts Through Natural Language Processing and Machine-Learning Methods
摘要
Sentiment analysis is a critical application of data analysis, enabling the understanding of public opinion and supporting decision-making, particularly in market analysis. This study focuses on Twitter, a platform with over 3 billion interactions, to classify sentiments as positive, negative, or neutral. By integrating the Natural Language Toolkit (NLTK) with machine-learning models—including Support Vector Machine (SVM), Gaussian Naive Bayes, Decision Tree, and Random Forest—we achieved a progressive improvement in accuracy, reaching 90% over 10 training epochs. Among the models, the Decision Tree demonstrated strong adaptability across diverse scenarios. This research presents a scalable sentiment classification framework that aids businesses in analyzing customer feedback and identifying market trends. The findings underscore the effectiveness of machine learning in processing large-scale textual data, highlighting its potential for real-time opinion mining. Future work aims to enhance performance by integrating transformer-based architectures like BERT and addressing overfitting to improve generalization. This study contributes to the development of more accurate and efficient sentiment analysis tools, enabling organizations to make data-driven decisions and better understand public sentiment.