A simple NLP project that classifies resumes into job categories using a Bag of Words representation and a Multinomial Naive Bayes model.
This notebook cleans resume text, extracts features with CountVectorizer, trains a MultinomialNB classifier, evaluates the model, and saves the trained pipeline with Joblib.
The dataset contains:
- 13,389 resume samples
- 2 columns:
CategoryandText - 43 classes in total
- Load the dataset
- Explore category distribution
- Clean resume text
- Convert text to features with Bag of Words
- Train a Naive Bayes classifier
- Evaluate using accuracy, classification report, confusion matrix, and cross-validation
- Save the model as a
.pklfile
- Test Accuracy: 71.32%
- Cross-Validation Mean Accuracy: 68.35%
The trained model was tested with example resumes such as:
- Data Scientist resume → predicted as Data Science
- Frontend Developer resume → predicted as React Developer
Resume Classification using Naive Bayes.ipynb— main notebookresume_classifier.pkl— saved trained modelrequirements.txt— Python dependenciesimages/— result plots for GitHub README
# 1. Install dependencies
pip install -r requirements.txt
# 2. Open the notebook
jupyter notebookIf you are running in Google Colab, upload the dataset and then run the notebook cells.
This project uses:
- pandas
- numpy
- scikit-learn
- matplotlib
- seaborn
- joblib
This is a strong baseline NLP classification project, but it is not perfect yet. A few things can still be improved:
Google Colab-specific code (from google.colab import files) should be removed or replaced for GitHub/local use.- The dataset path is hardcoded as
Dataset.csv, so make sure the file name matches in the repo. - Some classes have weaker recall, so future improvement could include TF-IDF, better preprocessing, or a tuned linear model.
- Replace Bag of Words with TF-IDF
- Try Logistic Regression or Linear SVM
- Tune hyperparameters with GridSearchCV
- Add a simple web app or Streamlit demo
Add a license here if you plan to open-source the repository.

