Natural Language Processing Models For Sentiment Analysis And Opinion Mining Using Contextual Embeddings

Authors

  • Pooja Pathak Department of Computer Engineering & Applications, GLA, University, Mathura.
  • Y Jayababu Professor, Department of Computer Science and Engineering, Pragati Engineering College, ADB Road, Surampalem, Near Peddapuram, Kakinada District, Andhra Pradesh, India - 533437.
  • Gayathri M Assistant Professor, Department of Management Studies, Meenakshi College of Arts and Science, Meenakshi Academy of Higher Education and Research.
  • P Vijaya Raghavulu Professor, Departmentof Information Technology, Vardhaman College of Engineering, Shamshabad, Hyderabad, India - 501 218.
  • Dr. Sowjanya Bagadi Assistant Professor, School of Business, Aditya University, Surampalem, Andhra Pradesh, Pin 533437.
  • Vijay Itnal Assistant Professor, Mechanical Engineering, Vishwakarma Institute of Technology, Pune, Maharashtra, 411037.
  • Bhawna Kaushik School of Sciences,Noida international University, Uttar Pradesh 203201, India.

Keywords:

Sentiment analysis, opinion mining, BERT, RoBERTa, contextual embeddings, transformer models, attention mechanism, aspect-level sentiment.

Abstract

Sentiment analysis and opinion mining are the essential activities of natural language processing (NLP) that retrieve subjective textual information. Conventional methods that rely on lexicon searches and fixed word embeddings do not generalise to polarity changes based on the context. This paper gives an in-depth analysis of contextual embedding models such as BERT, RoBERTa, and XLNet as used to sentiment classification and fine-grained opinion mining. We suggest a hybrid design that combines multi-head self-attention with domain-adaptive fine-tuning to deal with negation, sarcasm, and aspect-level sentiment. Our RoBERTa-based model obtains the state of the art results of 95.3% accuracy and 94.9% F1-score on four benchmark datasets (SST-2, IMDB, SemEval-2014, and Yelp), which is significantly higher than previous LSTM-based and fixed embedding models. We also present the studies of ablation and analysis of errors in order to outline the strong and weak sides of the suggested framework.

Downloads

Published

2026-05-24

How to Cite

Pathak, P., Jayababu, Y., M, G., Raghavulu, P. V., Bagadi, D. S., Itnal, V., & Kaushik, B. (2026). Natural Language Processing Models For Sentiment Analysis And Opinion Mining Using Contextual Embeddings. International Journal of Artificial Intelligence and Machine Learning, 6(3s), 159–167. Retrieved from https://www.svedbergopen.com/index.php/ijaiml/article/view/302