SentiLSTM: A Deep Learning Approach for Sentiment Analysis of Restaurant Reviews

Eftekhar Hossain, Omar Sharif, Mohammed Moshiul Hoque, Iqbal H. SarkerarXiv 2020

TL;DR

This paper introduces SentiLSTM, a deep learning framework designed for sentiment analysis of restaurant reviews in Bengali, a historically low-resource language in NLP. By introducing a newly curated dataset of 8,435 annotated reviews and leveraging a Bidirectional LSTM (BiLSTM) network with Word2Vec embeddings, the authors achieve a state-of-the-art classification accuracy of 91.35%, significantly outperforming traditional machine learning baselines.

What Problem Does This Paper Address?

While sentiment analysis is highly mature for high-resource languages like English and Chinese, it remains a significant challenge for low-resource languages such as Bengali. The primary bottlenecks are the severe lack of high-quality, standardized benchmark datasets and the limited availability of electronic textual content.

Previous attempts at Bengali sentiment analysis in the restaurant domain relied on very small datasets (around 1,000 reviews) and frequency-based feature extraction methods like TF-IDF. These traditional approaches fail to capture semantic context and struggle with word disambiguation—meaning they often misinterpret the true sentiment when faced with unseen data or complex sentence structures. The authors address this gap by creating a substantial, clean corpus and applying sequential deep learning architectures capable of capturing long-term text dependencies.

Methods

The authors propose a deep learning pipeline consisting of three main stages:

  1. Text to Vector Representation: Raw text is tokenized, mapped to numerical indices based on a vocabulary, and padded to a fixed optimal sequence length of $l=150$ words to minimize computational overhead while preserving vital information.
  2. Embedding Layer: Instead of sparse TF-IDF vectors, the framework utilizes dense word representations. A Word2Vec model is trained directly on their custom corpus using the Keras embedding layer to capture semantic relationships between Bengali words.
  3. Model Architecture: The core of the system is a Bidirectional LSTM (BiLSTM) network with 128 nodes. Unlike standard LSTMs, a BiLSTM processes text in both forward and backward directions, preserving contextual information from both preceding and succeeding words.

The output of the BiLSTM is passed through two dense layers (64 and 14 hidden units, respectively) utilizing ReLU activation functions. To prevent overfitting, a dropout layer with a 26% ratio is introduced between the dense layers. Finally, a Sigmoid layer outputs the binary sentiment prediction (positive or negative).

Fig. 1. BiLSTM based sentiment classification framework.

Datasets

A major contribution of this work is the development of the Bengali Restaurant Review Corpus (BRRC).

To build this, the authors collected 6,625 raw Bengali reviews from online platforms (Facebook comments, groups, and restaurant pages) and combined them with 2,000 manually translated reviews from the standard English Yelp dataset. They applied a rigorous filtering pipeline to remove duplicates, ultra-short reviews (<3 words), code-mixed text (mixtures of Bengali and other languages), neutral reviews, punctuation, and emojis.

The remaining 6,435 scraped reviews were manually annotated by three NLP experts. Using a majority-voting scheme and validating the quality with Cohen’s Kappa (achieving a reliable score of 0.81), they finalized a dataset of 8,435 reviews.

Summary statistics of the newly developed Bengali Restaurant Review Corpus (BRRC).

The data was split into 72% for training (6,072 reviews), 18% for validation (1,519 reviews), and 10% for testing (844 reviews).

Key Insights and Ideas

  • Context is King in Low-Resource Languages: Moving from frequency-based features (TF-IDF) to dense, context-aware embeddings (Word2Vec) combined with sequential architectures (BiLSTM) is essential for handling the structural nuances and word disambiguation challenges inherent to Bengali text.
  • Hyperparameter Tuning Matters: Through iterative optimization, the authors found that an initial learning rate of 0.0001, a batch size of 64, and the RMSprop optimizer yielded the best convergence, showing that careful tuning can push deep learning models past the performance of traditional ML models even on relatively modest dataset sizes.

Key Results

The proposed BiLSTM model was evaluated against several traditional machine learning baselines trained on the same corpus using TF-IDF features. SentiLSTM outperformed all of them across every metric:

  • Accuracy: 91.35% (compared to Naive Bayes at 89.5% and SVM at 88.3%).
  • Precision / Recall / F1-Score: 93.1% / 91.33% / 92.21%, demonstrating highly balanced performance.
  • Graphical Evaluation: The model achieved an impressive Area Under the ROC Curve (AUC) of 97% and an Average Precision (AP) score of 97%, confirming robust classification capabilities.

Limitations and Future Work

While SentiLSTM marks a clear step forward for Bengali NLP, the authors note a few limitations that prevent it from being production-ready:

  • Binary Constraints: The current model only classifies sentiment into binary categories (positive or negative), completely discarding neutral sentiments or fine-grained star ratings.
  • Lack of Aspect-Based Analysis: The framework evaluates the review as a whole but cannot yet isolate sentiments tied to specific aspects of a restaurant, such as separating a positive comment about "food quality" from a negative comment about "service speed."

Future work will focus on expanding the corpus to support multi-class classification and integrating aspect-based sentiment analysis.

Summary updated

BibTeX
@misc{hossain2020sentilstm,
  author = {Eftekhar Hossain and Omar Sharif and Mohammed Moshiul Hoque and Iqbal H. Sarker},
  title = {{SentiLSTM: A Deep Learning Approach for Sentiment Analysis of Restaurant Reviews}},
  year = {2020},
  eprint = {2011.09684},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2011.09684},
}
Figure