Git Product home page Git Product logo

sentiment-analysis-yelp-reviews's Introduction

Sentiment Analysis on Yelp Reviews

This project focuses on sentiment analysis of Yelp reviews using machine learning techniques, specifically leveraging a Transformer model with PyTorch and Hugging Face's BERT. The goal is to classify Yelp reviews into positive, negative, or neutral sentiments. The project was completed as a part of CSCE 633: Machine Learning at Texas A&M University.

Overview

Sentiment analysis plays a crucial role in understanding user opinions and feedback, with applications ranging from business insights to product development. In this project, we implement sentiment analysis on Yelp reviews, aiming to classify the sentiment expressed in each review. We leverage machine learning techniques, including a Transformer model with PyTorch and Hugging Face's BERT, to achieve accurate sentiment classification.

Key Components

  • Data Preprocessing: Punctuation and stopwords were removed, and text was standardized to lowercase. Star ratings were categorized into positive, negative, and neutral sentiments to facilitate classification.

  • Model Training: We employed transfer learning with a pre-trained BERT model and fine-tuned it on the Yelp reviews dataset. The model was trained to classify reviews into positive, negative, or neutral sentiments.

  • Evaluation: The trained model was evaluated using a test dataset, achieving a test accuracy of 87.60%.

Project Structure

  • data/: Contains the Yelp reviews dataset.

  • notebooks/: Jupyter notebooks used for data exploration, model training, and evaluation.

  • requirements.txt: Lists the dependencies required to run the project. Refer to this file for installation instructions.

Dependencies

Refer to the requirements.txt file for dependencies.

Usage

  1. Clone the repository: git clone https://github.com/your_username/sentiment-analysis-yelp.git

  2. Install dependencies: pip install -r requirements.txt

  3. Run the sentiment analysis model: Open the Jupyter Notebook Sentiment_Analysis.ipynb and follow the instructions inside for running the sentiment analysis model.

Acknowledgments

Special thanks to Professor Dr. Bobak Mortazavi for guidance and support throughout the course and project.

sentiment-analysis-yelp-reviews's People

Contributors

vishnu-vasan 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.