Year: 2025
Type: article
Abstract: Sentiment analysis of user‐generated content on social media offers invaluable insights for businesses and researchers yet remains challenging due to the informal, noisy, and context‐dependent nature of short texts. This work presents a reproducible, scalable pipeline for large‐scale sentiment classification of Twitter data, leveraging the publicly available Sentiment140 corpus of 1.6 million annotated tweets. Our methodology encompasses rigorous data integrity checks, regex‐based normalization (URL and mention substitution, character‐repeat contraction), tokenization, stopword removal, and lemmatization, followed by TF-IDF feature extraction with unigram and bigram ranges capped at 500 000 terms and augmented by a text‐length feature. We evaluate three linear classifiers—Bernoulli Naive Bayes, Linear Support Vector Classifier, and Logistic Regression—on a stratified 95 %/5 % train–test split, using metrics such as accuracy, precision, recall, macro-F1, ROC AUC, and PR AUC. Logistic Regression achieved the highest accuracy (79.73 %) and macro-F1 (0.80), while LinearSVC and BNB offered competitive performance with reduced computational overhead. Detailed error analysis highlighted limitations in handling sarcasm and mixed sentiments, and computational profiling on both local and GPU environments informed practical trade-offs. Our contributions include a robust end-to-end framework, a systematic classifier comparison, and insights into error sources and resource requirements. These provide a solid foundation for future enhancements such as contextual embeddings and real-time deployment.
Author: Faisal Abdullah Althobaiti
Language: English
Subfield: Artificial Intelligence
Field: Computer Science
Domain: Physical Sciences
Open Access status: diamond
OpenAlex ID: W4410918975
