This repository contains the code and report for our final project of Natural Language Processing course at UEH. For 3 machine learning models including Naive Bayes [Mosteller and Wallace (1964)], Maxent [Berger et al. (1996)] and XGBoost [Chen and Guestrin (2016)], we create a custom UI that allows users to directly enter the review and select a machine learning model of their choice. We deploy the RoBERTa model [Liu et al. (2019)] via Gradio and you can try experiment with it on our website here. The model checkpoint is available here.

UI-Demo.mov
To reproduce our results, first you need to clone the repository:
git clone https://github.com/quocviethere/UEH-NLP-Sentiment-Analysis
We provide the code for 3 models.
Example usage:
$ python naivebayes.py
$ python maxent.py
$ python xgboostclassifier.py
Please do note that you need to specify the dataset path correctly for the code to work. To run the UI, simply use:
python app.py
The Colab Notebook is also available:
We use 3 machine learning models including Naive Bayes, Maxent and XGBoost and a pretrained RoBERTa. The result is as follows:

For more detailed results as well as model details, check out our full report here.