Giter Club home page Giter Club logo

amazon-reviews-for-sentiment-analysis's Introduction

Amazon Customer Reviews Sentiment Analysis Dataset

License

About the Dataset

This dataset contains millions of Amazon customer reviews paired with star ratings. It serves as a powerful resource for training fastText models for sentiment analysis.

Key Features

  • Scale: The dataset is substantial, reflecting real business data on a reasonable scale, making it suitable for practical applications.
  • Efficiency: Despite its size, the dataset can be trained in minutes on a modest laptop, making it ideal for fastText applications.
  • Realistic: The reviews represent genuine customer sentiments, providing a valuable insight into real-world opinions.

Data Format

The dataset adheres to the format required for the fastText supervised learning tutorial:

__label__<X> __label__<Y> ... <Text>
  • X and Y represent class names (e.g., __label__1, __label__2).
  • Reviews are categorized into classes with no quotes, all on one line.
  • For this dataset, __label__1 corresponds to 1- and 2-star reviews, and __label__2 corresponds to 4- and 5-star reviews.
  • Reviews with neutral sentiment (3-star) were not included in the original dataset.
  • Review titles, followed by ':' and a space, are prepended to the text.
  • While most reviews are in English, there are some in other languages, such as Spanish.

Source

The data was sourced from Xiang Zhang's Google Drive directory. Note that the original data was in .csv format, which was reformatted for compatibility with fastText.

Training and Testing

Follow the instructions in the fastText supervised learning tutorial to set up the directory.

Training

Use the following command to train the model:

./fasttext supervised -input train.ft.txt -output model_amzn

This process typically takes just a few minutes.

Testing

Verify the accuracy of the trained model with the following test command:

./fasttext test model_amzn.bin test.ft.txt

If everything is in order, you should expect a precision and recall of 0.916.

Additionally, you can perform training and testing using Python; refer to the provided Kernel for details.

Happy analyzing! ๐Ÿš€

amazon-reviews-for-sentiment-analysis's People

Contributors

kartikey05 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.