Facebook pixel tracking

The Science and Information (SAI) Organization publishes open-access peer-reviewed journals in computer science and artificial intelligence.

Contact Info
Website thesai.org
Follow Us
Contact Info
Follow Us
Research Article | Open Access |

Sentiment Analysis and Emotion Detection Using Transformer Models in Multilingual Social Media Data

Author 1: Sultan Saaed Almalki
International Journal of Advanced Computer Science and Applications (IJACSA) · Vol. 16, No. 3 · Published 2025 · Cited by 11

DOI: 10.14569/IJACSA.2025.0160332

Abstract

The rapid expansion of multilingual social media platforms has resulted in a surge of user-generated content, introducing challenges in sentiment analysis and emotion detection due to code-switching, informal text, and linguistic diversity. Traditional rule-based and machine learning models struggle to process multilingual complexities effectively, necessitating advanced deep-learning approaches. This study develops a transformer-based sentiment analysis and emotion detection system capable of handling multilingual and code-mixed social media text. The proposed fine-tuned Cross-lingual Language Model – Robust (XLM-R) model is compared against state-of-the-art transformer models (mBERT, T5) and traditional classifiers (support vector machine (SVM), Random Forest) to assess its cross-lingual sentiment classification performance. A multilingual dataset was compiled from Twitter, YouTube, Facebook, and Amazon Reviews, covering English, Spanish, French, Hindi, Arabic, Tamil, and Portuguese. Data preprocessing included tokenization, stopword removal, emoji normalization, and code-switching handling. Transformer models were fine-tuned using cross-lingual embeddings and transfer learning, with accuracy, F1-score, and confusion matrices for performance evaluation. Results show that XLM-R outperformed all baselines, achieving an F1-score of 90.3%, while multilingual Bidirectional Encoder Representations from Transformers (mBERT) and T5 scored 84.5% and 87.2%, respectively. Preprocessing improved performance by 7%, particularly in code-mixed datasets. Handling code-switching increased accuracy by 8.9%, confirming the model’s robustness in multilingual sentiment analysis. The findings demonstrate that XLM-R effectively classifies sentiments and emotions in multilingual social media data, surpassing existing approaches. This study supports integrating transformer-based models for cross-lingual natural language processing (NLP) tasks, paving the way for real-time multilingual sentiment analysis applications.

Keywords

How to Cite this Article

Almalki, S. S. (2025). Sentiment Analysis and Emotion Detection Using Transformer Models in Multilingual Social Media Data. International Journal of Advanced Computer Science and Applications, 16(3). https://doi.org/10.14569/IJACSA.2025.0160332

Almalki, Sultan Saaed. "Sentiment Analysis and Emotion Detection Using Transformer Models in Multilingual Social Media Data." International Journal of Advanced Computer Science and Applications, vol. 16, no. 3, 2025, https://doi.org/10.14569/IJACSA.2025.0160332.

@article{Almalki2025,
  title     = {Sentiment Analysis and Emotion Detection Using Transformer Models in Multilingual Social Media Data},
  journal   = {International Journal of Advanced Computer Science and Applications},
  volume    = {16},
  number    = {3},
  year      = {2025},
  publisher = {The Science and Information Organization},
  author    = {Sultan Saaed Almalki},
  doi       = {10.14569/IJACSA.2025.0160332},
  url       = {https://doi.org/10.14569/IJACSA.2025.0160332}
}

Open Access — licensed under a Creative Commons Attribution 4.0 International License. Unrestricted use, distribution, and reproduction in any medium, even commercially, as long as the original work is properly cited.

Call for Papers - Important Dates

Volume 17 No. 11, November 2026
Paper Submission Due October 25, 2026
Review Notification November 15, 2026
Publication Date November 30, 2026