Natural Language Processing Models For Sentiment Analysis And Opinion Mining Using Contextual Embeddings
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.




