roberta english book reviews sentiment

fpianz

Roberta-English-Book-Reviews-Sentiment

Introduction

The Roberta-English-Book-Reviews-Sentiment model is a fine-tuned version of the RoBERTa model specifically designed for sentiment analysis of English book reviews. It classifies sentiment into three categories: positive, negative, and neutral. The model is built upon the foundation of j-hartmann/sentiment-roberta-large-english-3-classes.

Architecture

This model utilizes the RoBERTa architecture and has been fine-tuned for text classification tasks. It leverages the Transformers library and is compatible with PyTorch and Safetensors.

Training

The model is trained using annotated sentences from English book reviews and paragraphs from amateur writers' stories. The annotated dataset is sourced from this resource and this paper.

Performance

  • Books:

    • Negative: Precision 0.83, Recall 0.88, F1-score 0.85
    • Neutral: Precision 0.68, Recall 0.51, F1-score 0.58
    • Positive: Precision 0.79, Recall 0.85, F1-score 0.82
    • Overall Accuracy: 0.79
  • Reviews:

    • Negative: Precision 0.89, Recall 0.92, F1-score 0.91
    • Neutral: Precision 0.96, Recall 0.91, F1-score 0.94
    • Positive: Precision 0.94, Recall 0.98, F1-score 0.96
    • Overall Accuracy: 0.94

Guide: Running Locally

  1. Installation:

    • Ensure Python and PyTorch are installed on your system.
    • Install the Transformers library: pip install transformers.
  2. Model Download:

    • Use the Hugging Face Model Hub to download the model:
      from transformers import AutoModelForSequenceClassification, AutoTokenizer
      
      model = AutoModelForSequenceClassification.from_pretrained("fpianz/roberta-english-book-reviews-sentiment")
      tokenizer = AutoTokenizer.from_pretrained("fpianz/roberta-english-book-reviews-sentiment")
      
  3. Inference:

    • Run sentiment analysis on your text data using the model and tokenizer.
  4. Suggested Cloud GPUs:

    • For larger datasets or faster processing, consider using cloud GPU services like AWS, Google Cloud, or Azure.

License

This model is released under the MIT License, allowing for both academic and commercial usage.

More Related APIs in Text Classification