Skip to content

The repository contains the code which can summarize Amazon's review

Notifications You must be signed in to change notification settings

jalajthanaki/Amazon_review_summarization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Text-Summarization-with-Amazon-Reviews

The objective of this project is to build a seq2seq model that can create relevant summaries for reviews written about fine foods sold on Amazon. This dataset contains above 500,000 reviews, and is hosted on Kaggle. It's too large to host here, it's over 300MB.

To build our model we will use a two-layered bidirectional RNN with LSTMs on the input data and two layers, each with an LSTM using bahdanau attention on the target data. Jaemin Cho's tutorial for seq2seq was really helpful to get the code in working order because this is my first project with TensorFlow 1.1; some of the functions are very different from 1.0. The architecture for this model is similar to Xin Pan's and Peter Liu's, here's their GitHub page.

This model uses Conceptnet Numberbatch's pre-trained word vectors.

dependencies

  • pandas
  • numpy
  • nltk
  • tensorflow 1.1
  • python 3

Install

pandas:     $ sudo pip install pandas
numpy:      $ sudo pip install numpy
nltk:       $ sudo pip install nltk
tensorflow: $ sudo pip3 install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.1.0-cp34-cp34m-linux_x86_64.whl

Demo Results

Here are some examples of reviews and their generated summaries:

  • Description(1): The coffee tasted great and was at such a good price! I highly recommend this to everyone!

  • Summary(1): great coffee

  • Description(2): This is the worst cheese that I have ever bought! I will never buy it again and I hope you won’t either!

  • Summary(2): omg gross gross

  • Description(3): love individual oatmeal cups found years ago sam quit selling sound big lots quit selling found target expensive buy individually trilled get entire case time go anywhere need water microwave spoon know quaker flavor packets

  • Summary(3): love it

I wrote an article about this project that explains parts of it in detail.

Credit

Code credits for this code go to David Currie I've merely created a wrapper and necessary changes to get people started.

About

The repository contains the code which can summarize Amazon's review

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published