Emotion Analysis of Food Reviews

This project was a part of the Information Retrieval course offered at BITS Pilani, K K Birla Goa Campus. The goal of this project is to perform sentiment analysis of Amazon Fine Food Reviews dataset, and this is done using an IR model in which each review is scored on a sentiment score of 0-5 against 5 different aspects:

  • Taste Quality
  • Product Quality
  • Price
  • Quantity
  • Delivery

The main steps that go about into the IR model are:

  1. Sentence Decomposition
  • Forming micro-sentences from entire review [input]
  • Exclamatory phrases like ‘Wow!’ form individual micro-sentences, and add to emotional weight of neighboring micro-sentences
  • Isolated-word spelling correction using n-gram index edit distance
  • Can use frameworks like NLTK for decomposition into micro-sentences
  1. Feature-Emotion Extraction
  • List of features (example – food quality, service) composed
  • Dictionary of emotions/adjectives along with their polarity score used (example – SenticNet)
  • Dictionary of emojis/emoticons (text/image/encoded form) along with their polarity score used (example – Emoji Sentiment Ranking)
  • POS-tagging used to extract object (feature) and adjective (emotion) of each micro-sentence
  • Score of each feature calculated by corresponding emotion’s polarity score
  • Polarity of emoji contributes to score of particular feature depending on context/position of emoji
  1. Scoring
  • For each feature, scores of individual micro-sentences summed
  • Final feature scores normalized to prevent discrimination between lenient/strict raters [output
  • Final emotion (example – satisfied, angry) of user calculated on basis of weighted scores of all features [output]
Shivin Thukral
Shivin Thukral
Machine Learning Engineer

Working as an MLE on building recommendation systems using ML and NLP techniques

Related