Skip to content

This repository contains the code and report for our final project of Natural Language Processing course at UEH.

Notifications You must be signed in to change notification settings

quocviethere/UEH-NLP-Sentiment-Analysis

Repository files navigation

UEH NLP Sentiment Analysis

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.


Screen Shot 2023-12-22 at 10 30 35

Demo


UI-Demo.mov

Implementation

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: Open In Colab

Results

We use 3 machine learning models including Naive Bayes, Maxent and XGBoost and a pretrained RoBERTa. The result is as follows:

Screen Shot 2023-12-21 at 22 47 53

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


About

This repository contains the code and report for our final project of Natural Language Processing course at UEH.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published