Over the past decade, social media has become a key platform for people worldwide to express opinions and engage in discussions, generating massive amounts of user data. Sentiment analysis—using natural language processing (NLP), machine learning, and data mining—has become essential for interpreting these emotions as positive, negative, or neutral.
Traditional sentiment analysis methods rely on lexicon-based approaches and conventional machine learning models (e.g., Naïve Bayes, SVM) that use handcrafted features. These methods struggle with informal language, sarcasm, emojis, multilingual content, and contextual nuances typical in social media. To overcome these limitations, modern systems incorporate advanced AI techniques such as deep learning and transformer-based models (notably BERT), which better capture context and semantics.
The proposed system preprocesses noisy social media text through normalization, tokenization, and emoji interpretation, then uses a combination of embeddings (Word2Vec, GloVe, BERT) and features for sentiment classification. It employs both traditional classifiers and deep learning models (LSTM, transformers), evaluating performance using standard metrics like accuracy, precision, recall, and F1-score.
Experiments show that transformer-based models, particularly BERT, outperform other techniques across multiple domains such as politics, business, entertainment, sports, and health. The system maintains high accuracy and robustness, demonstrating its potential for real-world applications in marketing, political analysis, customer service, and healthcare.
While deep learning models, especially BERT, significantly improve performance, challenges remain with domain-specific jargon, sarcasm, and resource-intensive computation. Future work may explore multilingual analysis, domain adaptation, and lighter transformer models to enhance scalability and applicability.
Conclusion
ThegoalofthisresearchwastocreateandassessasentimentanalysissystemdrivenbyAIthatcouldidentifyandcategorizeviewpointsfromsocialmediaposts.TherapidexpansionofsocialmediasiteslikeFacebook,Instagram,andTwitterhasmadeitmorecrucialthanevertocomprehendpublicopinionwhenmakingdecisionsinthefieldsofpolitics,business,entertainment,andhealth.Tofindthebeststrategyforexaminingsocialmediacontent,thestudy contrasted transformer-based models, deep learning techniques, and conventional machine learning classifiers.
Giventhecomplexlinguisticfeaturesofsocialmediadata,theresultsunequivocallyshowthatwhileconventionalclassifierslikeLogisticRegression,RandomForest,andSVMofferacceptablebaselines,theirshortcomingsbecomeapparent. AlthoughtheLSTMmodelmadesignificantprogressinidentifyingsequentialdependenciesintext,itwasstillunabletohandlelongersentencesandunclearlanguage. WithbetterresultsinAccuracy,Precision, Recall, andF1-score, thetransformer-basedarchitectureBERTcontinuouslybeatallothermethods.Itsabilityto understand bidirectional context made it the most dependable model for sentiment analysis, which enabled it to deal with slang, sarcasm, and nuanced sentiment with ease.
The sector-specific assessment strengthened the suggested system’s flexibility even more.The model main- tained consistently high scores, with the Health and Business sectors performing especially well, despite minor variationsinperformanceacrossdomains. Althoughtheresultswerestillwithinacceptableperformancemargins, thecomparativelylowerperformanceinSportsandPoliticsemphasizesthedifficultiespresentedbydynamiclan- guage and sarcasm in these domains.This illustrates how the system can be applied with minimal change in a number of fields.
The suggested sentiment analysis system has a lot of potential in terms of real-world applications.Political campaigns can utilize it to measure public opinion, businesses can utilize it to monitor their brand and analyze customerfeedback,andhealthorganizationscanutilizetolearnhowthepublicviewsmedicalissues.Furthermore, the system’s cross-sector adaptability highlights its adaptability for practical implementation.
There are several prospects for improvement in the future.By addressing computational issues, lightweight transformer models could improve the system’s suitability for low-resource environments.Adding multilingual supporttothesystemwouldalsomakeitmoreapplicableininternationalsettings. Furthermore,combiningemo- tion recognition and sentiment intensity detection may offer more profound understanding of user viewpoints.
This study concludes that transformer-based sentiment analysis systems are a major development in opinion mining, providing precise, flexible, and useful ways to glean insights from the quickly changing social media landscape.
References
[1] B. Pang and L. Lee, ”Opinion Mining and Sentiment Analysis,” Foundations and Trends in Information Re- trieval, vol. 2, no. 1–2, pp. 1–135, 2008.
[2] A.Go, R.Bhayani, andL.Huang, ”ClassifyingSentimentonTwitterthroughRemoteSupervision,”CS224N Project Report, Stanford University, 2009.
[3] B.Liu,”OpinionMiningandSentimentAnalysis,”SynthesisLecturesonHumanLanguageTechnologies,vol. 5, no. 1, pp. 1–167, 2012.
[4] Y. Kim, ”Sentence Classification Using Convolutional Neural Networks,” arXiv preprint arXiv:1408.5882, 2014.
[5] S.Rosenthal, P.Nakov, S.Kiritchenko, S.Mohammad, A.Ritter, andV.Stoyanov, ”SemEval-2015Task10: SentimentAnalysisin Twitter, ”ProceedingsoftheInternationalWorkshoponSemanticEvaluation,pp. 451–463, 2015.
[6] A.HassanandA.Mahmood,”DeepLearningforSentenceClassification,”IEEEAccess,vol.6,pp.6706–6717, 2018.
[7] S.Minaee,N.Kalchbrenner, E.Cambria,N.Nikzad,M.Chenaghlu,andJ.Gao, ”DeepLearning–BasedText Classification: A Comprehensive Review,” ACM Computing Surveys, vol. 54, no. 3, pp. 1–40, 2021.
[8] J.Devlin, M.Chang, K.Lee, andK.Toutanova, ”BERT:Pre-trainingofDeepBidirectionalTransformersfor Language Understanding,” Proceedings of NAACL, pp. 4171–4186, 2019.
[9] T.Mikolov,K.Chen,G.Corrado,andJ.Dean,”EfficientEstimationofWordRepresentationsinVectorSpace,” arXiv preprint arXiv:1301.3781, 2013.
[10] A. Vaswani et al., ”Attention is All You Need,” Proceedings of Advances in Neural Information Processing Systems (NeurIPS), pp. 5998–6008, 2017.
[11] S.Zhang,Y.Tong,andL.Xu,”ASurveyofDLModelsforSocialMediaSentimentAnalysis,”Information Fusion, vol. 63, pp. 1–10, 2020.
[12] H. Araque, I. Corcuera-Platas, J. F. Sa´nchez-Rada, and C. A. Iglesias, ”Improving Deep Learning Senti- mentAnalysisinSocialApplicationswithEnsembleTechniques,”ExpertSystemswithApplications,vol. 77,pp. 236–246, 2017.
[13] R.K.MohapatraandS.S.Nayak,”HybridModelsforTwitterSentimentAnalysis: CombiningLexiconand Machine Learning Approaches,” Procedia Computer Science, vol. 189, pp. 364–371, 2021.
[14] A.KumarandP.Garg,”Aspect-BasedSentimentAnalysisUsingDeepLearning: ASurvey,”WileyInterdis- ciplinary Reviews: Data Mining and Knowledge Discovery, vol. 10, no. 5, p. e1364, 2020.
[15] F. Alam, F. R. Khan, and A. Imran, ”Sentiment Analysis of Social Network Data for Disaster Management: A Systematic Literature Review,” International Journal of Disaster Risk Reduction, vol. 50, p. 101734, 2020.