Skip to content

Mohrezasharifi/Large-Language-Models-Projects

Repository files navigation

LLMs-for-sentiment-analysis

Screenshot 2025-08-06 at 01 02 06

Aim of the Project:

This study aims to investigate the application of Large Language Models (LLMs) not only for sentiment analysis but also for detecting the underlying emotions and intentions expressed in text. While traditional research in this area has largely focused on identifying sentiment polarity—such as positive, negative, or neutral—this work seeks to explore deeper layers of meaning embedded in language. Understanding emotions (e.g., joy, anger, sadness) and intentions (e.g., persuasion, inquiry, command) provides a more nuanced perspective on human communication. By leveraging the contextual and generative capabilities of LLMs, this research opens new avenues for extracting richer and more actionable insights from textual data, ultimately contributing to more intelligent and empathetic human-computer interactions.

Tech Stack:

  • BART-MNLI in a ZeroShot setting for LLM annotation
  • RoBERTa for sentiment analysis
  • DistiledBERT
  • GPT
  • Tensorflow
  • Pytorch
  • Python Programming Language

Datasets:

  • GoEmotions
dataused
  • Ekman's Basic Emotions and Plutchik's wheel of emotions
image image

source: https://www.researchgate.net/figure/Ekmans-six-basic-emotions-and-Plutchiks-wheel-of-emotions-the-middle-circle-contains-8_fig1_346179935

source: https://research.google/blog/goemotions-a-dataset-for-fine-grained-emotion-classification/

Large Language Models Applied:

Screenshot 2025-08-15 at 22 18 09

Results:

Finetuned RoBERTa on the data for Sentiment Analysis on five classes from Very Negative to Very Negative:

Screenshot 2025-08-15 at 22 14 24

Finetuned DistilBERT on GoEmotions Taxonomy:

Screenshot 2025-08-15 at 22 16 19

Beyond quantitative gains, this research underscores the value of interdisciplinary annotation and careful methodology in producing reproducible results. Future work should focus on scaling annotation, exploring ordinal and multi-label classification, and applying active learning to improve efficiency. By combining advanced NLP techniques with domain expertise, this study offers a reproducible framework for extracting actionable insights from EV drivers’ experiences with public charging stations, with applications in infrastructure planning, customer service, and sustainable mobility policy.

Demo:

https://698e13ad37f2f10770.gradio.live

#Contact

For further clarification or inqueries, get in touch with through m.r.sharif2@ncl.ac.uk or rezatayeb2017@gmail.com

About

LLMs for Sentiment Analysis

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages