"# icog-labs-naive-bayes-implementation"
# Customer Support Ticket Router
A customer-support intent classification system built from scratch using **Multinomial Naive Bayes and NumPy**.
The system takes a customer's message and predicts the most appropriate support intent, such as `cancel_order`, `track_order`, `payment_issue`, `recover_password`, `change_order`, `check_invoice`, and `get_refund`.
The project also includes a Tkinter GUI for testing individual customer requests and an evaluation system for measuring model performance.
---
## Features
* Multinomial Naive Bayes classifier implemented from scratch
* NumPy-based model calculations
* Text preprocessing
* Unigram and bigram features
* Stopword removal
* Document-frequency based vocabulary filtering
* Laplace smoothing
* Stratified train/test splitting
* Accuracy, Precision, Recall, and F1 evaluation
* Classification report
* Error analysis
* Tkinter graphical interface
* No machine-learning library is used for the classifier
---
## Dataset
This project uses the **Bitext Customer Support Training Dataset**, specifically:
`Bitext_Sample_Customer_Support_Training_Dataset_27K_responses-v11`
Credit goes to the dataset creators for providing the customer-support training data used in this project.
After duplicate removal, the dataset contained:
Original records: 26,872
Duplicates removed: 2,237
Remaining records: 24,635
The dataset contains customer-support intents covering areas such as:
* Order cancellation
* Order changes
* Shipping address changes
* Payment issues
* Payment methods
* Invoice requests
* Refunds
* Account creation
* Account deletion
* Password recovery
* Delivery information
* Order tracking
* Customer service
* Complaints
* Reviews
* Newsletter subscriptions
## Technologies
* **Python**
* **NumPy** — model calculations and numerical operations
* **Pandas** — dataset handling
* **Tkinter** — graphical user interface
---
## Project Structure
```text
customerSupp …