srimeenakshiks's picture
Update README.md
ce96955 verified
metadata
library_name: transformers
tags:
  - sentiment analyzer
  - aspect based sentiment analyzer
  - text classification
  - bert model
  - imdb dataset
license: mit
datasets:
  - stanfordnlp/imdb
language:
  - en
base_model:
  - google-bert/bert-base-uncased

Model Card for Model ID

This model is a fine-tuned BERT model designed for aspect-based sentiment analysis, enabling the classification of sentiments associated with specific aspects in text. It provides valuable insights into customer opinions and sentiments regarding different features in user-generated content.

Model Details

Model Description

The Aspect-Based Sentiment Analyzer using BERT is a state-of-the-art natural language processing model designed to identify and analyze sentiments expressed towards specific aspects within a given text. Leveraging the power of the BERT architecture, this model excels in understanding contextual nuances, enabling it to accurately classify sentiments as positive, negative, or neutral for various product features or attributes mentioned in customer reviews or feedback.

Trained on the Stanford IMDB dataset, the model has been fine-tuned to detect sentiment related to different aspects, making it valuable for businesses aiming to enhance customer satisfaction and gather insights from user-generated content. Its robust performance can aid in sentiment analysis tasks across various domains, including product reviews, service evaluations, and social media interactions.

  • Developed by: Srimeenakshi K S
  • Model type: Aspect-Based Sentiment Analysis
  • Language(s) (NLP): English
  • License: MIT License
  • Finetuned from model: BERT-base-uncased

Uses

Direct Use

The model can be used directly to classify sentiments in user-generated text based on specified aspects without the need for additional fine-tuning. It is suitable for analyzing reviews, social media posts, and other forms of textual feedback.

Downstream Use

This model can be integrated into applications for customer feedback analysis, chatbots for customer service, or sentiment analysis tools for businesses looking to improve their products and services based on customer input.

Out-of-Scope Use

The model may not perform well with text that contains heavy sarcasm or nuanced expressions. It should not be used for critical decision-making processes without human oversight.

Bias, Risks, and Limitations

The model may reflect biases present in the training data, leading to potential misclassification of sentiments. Users should be cautious in interpreting results, particularly in sensitive applications where sentiment analysis can impact customer relationships.

Recommendations

Users (both direct and downstream) should be made aware of the risks, biases, and limitations of the model. It is recommended to validate results with a diverse set of data and consider human judgment in ambiguous cases.

How to Get Started with the Model

Use the code below to get started with the model.

from transformers import pipeline

sentiment_analyzer = pipeline("text-classification", model="srimeenakshiks/aspect-based-sentiment-analyzer-using-bert")
result = sentiment_analyzer("The food was amazing, but the service was slow.", aspect="service")
print(result)

Training Details

Training Data

The model was trained on the IMDB dataset, which contains movie reviews labeled with sentiment (positive and negative). This dataset is commonly used for sentiment analysis tasks and includes a diverse range of reviews, allowing the model to learn various expressions of sentiment effectively.

Training Procedure

Preprocessing

Data preprocessing involved tokenization, padding, and normalization of text inputs to fit the BERT model requirements.

Training Hyperparameters

  • Training regime: fp16 mixed precision

Evaluation

Testing Data, Factors & Metrics

Testing Data

The model was evaluated using the same dataset on which it was trained, ensuring consistency in performance metrics and providing a reliable assessment of its capabilities in aspect-based sentiment analysis.

Factors

The evaluation included various aspects such as product features, service quality, and user experience.

Metrics

Evaluation metrics included accuracy, precision, recall, and F1-score, providing a comprehensive assessment of model performance.

Results

The model achieved an accuracy of 95% on the test dataset, demonstrating effectiveness in aspect-based sentiment classification.

Summary

The results indicate that the model performs well across a range of aspects but may struggle with nuanced sentiment expressions.

Model Examination

Further interpretability work can be conducted to understand how the model makes its predictions, particularly focusing on attention mechanisms within BERT.

Environmental Impact

Carbon emissions can be estimated using the Machine Learning Impact calculator presented in Lacoste et al. (2019).

  • Hardware Type: NVIDIA GeForce RTX 4050
  • Hours used: 20 hours
  • Cloud Provider: AWS
  • Compute Region: US-East
  • Carbon Emitted: 3.5

Technical Specifications

Model Architecture and Objective

The model is based on the BERT architecture, specifically designed to understand the context of words in a sentence, enabling it to classify sentiments associated with different aspects effectively.

Compute Infrastructure

Hardware

  • GPU: NVIDIA GeForce RTX 4050
  • RAM: 16GB

Software

  • Framework: PyTorch
  • Library Version: Hugging Face Transformers version 4.44.2

Citation

BibTeX:

@model{srimeenakshiks2024aspect, title={Aspect-Based Sentiment Analyzer using BERT}, author={Srimeenakshi K S}, year={2024}, publisher={Hugging Face} }

APA:

Srimeenakshi K S. (2024). Aspect-Based Sentiment Analyzer using BERT. Hugging Face.

Glossary

  • Aspect-Based Sentiment Analysis (ABSA): A subfield of sentiment analysis that focuses on identifying sentiments related to specific features or aspects of a product or service.

Model Card Authors

  • Author: Srimeenakshi K S

Model Card Contact

For inquiries or feedback, please reach out to [[email protected]].