Giter VIP home page Giter VIP logo

tripadvisor_reviews_rating_nlp's Introduction

Tripadvisor_reviews_rating_NLP

Project Overview

I created a tool that classifies Tripadvisors reviews into three categories: negative, neutral, positive.

  • Created a tool that classifies Tripadvisors reviews into three categories (accuracy: 85%).
  • Data collection on Kaggle website: https://www.kaggle.com/andrewmvd/trip-advisor-hotel-reviews.
  • Exploratory Data analysis using Wordcloud.
  • Text preprocessing: removed punctuations, stemming, word embedding ...
  • Created a simple LSTM model.
  • Testing model for inference on one sentence.

Code and Resources Used

Python Version: 3.7

Data Collection: https://www.kaggle.com/andrewmvd/trip-advisor-hotel-reviews

About the dataset

The dataset contains 20k reviews crawled from Tripadvisor labeled from 1 star to 5 stars. Stop words have already been removed from the reviews. This dataset can be used to predict review rating or to explore key aspects that make hotels good or bad.

Exploratory Data Analysis

I wanted to use wordcloud to check if there is major differences in terms of frequences of use of words. The major differences between positive and neutral/negatives reviews is the presence of 'n't'. It seems that people mostly use 'n't' to showcase their dissatisfaction.

alt text alt text

Text preprocessing

First of all, I removed all non alphabetic characters from the reviews, then I applied stemming. After that, I transformed each reviews to a sequence of integers using tokeniser from keras. Then, I used padding to make all sentences same length. Finally, I used word embedding my keras model.

alt text

Model Building

I created a simple LSTM model.

alt text

Model performance

alt text alt text

Productionization and Deployment

Coming Soon!

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.