This project aims to enhance the tourism experience in District 5, Ho Chi Minh City, by providing a sentiment-based restaurant recommendation system. By utilizing Machine Learning to analyze actual review content, we provide reliable insights (Positive, Negative, Neutral) to help tourists make better dining choices beyond simple star ratings.
Course: Introduction to Machine Learning (Nhập môn Học máy)
University: Ho Chi Minh City University of Science (VNU-HCMUS)
| Name | Student ID |
|---|---|
| Phạm Khánh Linh | 23127083 |
| Võ Trung Hiếu | 23127190 |
| Nguyễn Thành Lợi | 23127408 |
| Lê Quốc Thiện | 23127481 |
| Phạm Quang Thịnh | 23127485 |
Instructors: TS. Bùi Tiến Lên, ThS. Lê Nhựt Nam, Võ Nhật Tân
Due to GitHub's file size limits, the core datasets and the full source code for the web app are hosted on Google Drive. Please download these folders to run the project locally:
👉 Download Dataset & Web App Source (Google Drive)
dataset/: Contains raw and processed JSON/CSV files.food-recommend-sys/: Contains the full-stack source code (Next.js & Express).
- Training Set: Approximately 32.7k Vietnamese reviews sourced from Hugging Face and Kaggle.
- Real-world Set: A specific dataset for District 5 containing 349 restaurants and 8,369 reviews, scraped from Google Maps using a custom Selenium crawler.
To handle the nuances of Vietnamese "internet slang" (teencode) and culinary feedback, we implemented:
- Standardization: Mapping "Teencode" (e.g.,
ko→không) and informal abbreviations. - Emoji Mapping: Translating icons into descriptive Vietnamese words (e.g., 😍 →
thích). - Word Segmentation: Utilizing the
pyvilibrary for accurate Vietnamese compound word processing. - Sequence Management: Reviews are truncated to a maximum of 256 words to optimize memory usage and performance.
We compared three distinct architectures to identify the most effective solution for Vietnamese sentiment analysis.
| Model | Accuracy | Macro F1 | Latency | Paradigm |
|---|---|---|---|---|
| SVM | 0.826 | 0.801 | 17.9ms | Traditional ML (TF-IDF) |
| BiGRU | 0.834 | 0.803 | 2.0ms | Deep Learning (RNN-based) |
| PhoBERT | 0.885 | 0.863 | 10.4ms | State-of-the-Art (Transformer) |
- Split Strategy: 80:10:10 (Train:Validation:Test) with Stratified Sampling to maintain balanced class distributions.
- Class Imbalance: Handled via Class Weights (Negative: 1.75, Neutral: 1.63, Positive: 0.55) to prevent bias toward the majority class.
- Optimization: PhoBERT was fine-tuned using AdamW with a learning rate of 2e-5 and Step-wise evaluation every 200 steps to monitor convergence.
The final system is a high-performance, full-stack web application designed for end-users.
- App URL: ml-lab1-restaurant.vercel.app
- Tech Stack: Next.js (Frontend), Express.js (Backend), MongoDB Atlas (Database).
- Key Features:
- Smart Filtering: Filter restaurants by category, price range, and hours.
- Sentiment Insights: Visual charts summarizing Positive, Neutral, and Negative reviews for each restaurant.
- Live Predictions: Sentiment labels are generated by the PhoBERT model for the highest accuracy.
├── dataset/ (Drive) # Raw and processed datasets
├── food-recommend-system/(Drive)# Full-stack Web Application source code
├── crawl_metadata/ # Scrapers for restaurant metadata (Selenium)
├── crawl_review/ # Scrapers for Google Maps reviews (Selenium)
├── preprocessing and eda/ # Notebooks for data cleaning and EDA
├── model/ # Training scripts for SVM, BiGRU, and PhoBERT
├── evaluation/ # Performance assessment (Metrics & Confusion Matrices)
├── label/ # Sentiment label definitions
├── requirements.txt # Python dependency list
└── README.md # Project documentation
The results demonstrate that PhoBERT significantly outperforms traditional models in understanding Vietnamese linguistic nuances.
Future Directions:
- Scale the data collection to all districts in Ho Chi Minh City.
- Implement Model Quantization to reduce the PhoBERT footprint for mobile deployment.
- Integrate Multimodal Learning (analyzing food photos alongside text reviews).
Created for the Lab 01 assignment at HCMUS - April 15, 2026.