Summarizing product reviews into Dashboard

Saurabh Bairagi
4 min readOct 18, 2022

--

Hello everyone, are you looking for a way to consume all the long and multiple reviews on a e-commerce website into a concise way??

If yes, then you’re in here for a treat :)

Let’s jump into the model and see how to use it for making better purchase decision in a short amount of time!

Here, for the demo purpose we are using the link for One plus mobile and generating the dashboard for the same.

Demo of working model

Demo Links to play with dashboard :

  1. Iphone 14:
    https://www.flipkart.com/apple-iphone-14-midnight-128-gb/product-reviews/itm9e6293c322a84?pid=MOBGHWFHECFVMDCX&lid=LSTMOBGHWFHECFVMDCXXRTRJG&marketplace=FLIPKART
    Page number = 1
    Number of pages you to want data from = 10 (Example)
  2. OnePlus Nord CE 2:
    https://www.flipkart.com/oneplus-nord-ce-2-lite-5g-blue-tide-128-gb/product-reviews/itm7acae55b999e6?pid=MOBGMFREBAHZQGY9&lid=LSTMOBGMFREBAHZQGY9QI18PF&marketplace=FLIPKART
    Page number = 1
    Number of pages you to want data from = (Example) 10
  3. JBL Earphone:
    https://www.flipkart.com/jbl-c50hi-wired-headset/product-reviews/itm056b35eacafd3?pid=ACCFAMFQSGUG9D8R&lid=LSTACCFAMFQSGUG9D8RUMXXIK&marketplace=FLIPKART
    Page number = 1
    Number of pages you to want data from = (Example) 10
  4. HP Laptop:
    https://www.flipkart.com/hp-14s-intel-core-i3-11th-gen-1115g4-8-gb-512-gb-ssd-windows-11-home-dy2508tu-thin-light-laptop/product-reviews/itm42a82790cf5ec?pid=COMGGTT4VFWG3FFM&lid=LSTCOMGGTT4VFWG3FFMB7VNLU&marketplace=FLIPKART
    Page number = 1
    Number of pages you to want data from = (Example) 10

1. How to use the Model?

a. Go to Flipkart website and select the product, whose summary you want to get.

b. Scroll down to the reviews section and click on “All reviews”.

c. You can either work with the current URL (Page Number =1) or click on “Next page” which has the URL as (Page number = 2).

Page Number 1

e. Copy this URL, paste it in the model. Then, specify the page number it contains and then the number of pages you want the model to extract.

Model

f. Click on “Get Summary” to start the model and wait for the interactive dashboard to show up :)

2. Model Demo

The dashboard is now generated which has the following plots:

a. Sidebar Menu for Aspects :

Aspects extracted for One plus mobile

Here we can see all the aspects of the product and you can click on any one of them to generate various plots.

b. Bar plot for Sentiments :

Sentiments for aspects

The bar plot shows the overall sentiment that each aspect carries.

A higher score indicates more positive reviews for that particular aspect and vice versa.

c. Table for displaying positive / negative reviews :

Positive Reviews for “Camera”

Here, we see the positive reviews for the aspect “camera”.

d. Pie chart showing sentiments :

Sentiments for “camera”

The chart gives us an idea of what sort of sentiments do the people hold when it comes to one particular aspect of the product.

e. Line plot for Aspect :

This plot represents the progress or the downfall of an aspect of the product through a period of time. The x-axis has the timeline and the y-axis represents the score.

The score carries the sentiment and from the below plot we can conclude that; from January 2022 to April 2022 there were a lot of negative reviews for the “camera” aspect.

Sentiment across timeline

f. Wordcloud for Aspect :

This wordcloud helps us to know about, ‘What qualities / features are people talking about’ when it comes to a particular aspect.

Below, the WordCloud for “camera” is shown and we can see words like; rear, pro, wide, great, good, etc.

3. Internal working of the model

The model works and generates the dashboard in following stages:

a. Fetching the data through pagination and creating a dataframe.

b. Cleaning the reviews.

c. Aspect and description extraction.

d. Feature Engineering.

e. Model predicts the score which ranges between [-1,1] and later based on the score, the model converts them into three sentiments namely; “Positive, Negative and Neutral.”

f. Final dataframe is created with all the above features contained in it.

g. Plotly and streamlit is used to make the web app.

One significant aspect of the web app is that it does all the heavy lifting of fetching data, generating aspects and sentiments ON THE GO!!! Nothing needs to be saved and loaded except for the model.

I hope this post helped you to understand how to use this model and have a happy time playing with the dashboard for your favorite product :))

--

--