In this project:
- a machine learning model was developed to categorize given resumes.
- a python script was developed to: run on command line, use the model to categorize all resumes (in .pdf format) from a <given_path>, and move them in their respective folders (inside the <given_path> and named as the category)
The dataset was collected from a kaggle repository. The link is here
- The dataset contains a total of 2484 entries, in text and html format.
- The dataset has 24 different categories.
- Text was preprocessed with the help of NLTK library.
- All the categories do not have same number of entries. So the data was stratified based on the 'Category' column while splitting and StratifiedKFold cross validation was used for validating the models.
- TfidfVectorizer was used for feature extraction.
- Several models were validated before choosing two best performing models.
- Parameter tuning was done using the GridSearchCV
- Best performing model was choosed as the final model.
To see the models performance details please download the 'resume-classification.ipynb' file. Open it with jupyter notebook and check the last cell of 'Model Selection and Training' section.
- It uses the model to classify resumes (in .pdf format for now) in a <given_path>
- Move the resumes in their respective folders (inside the <given_path> and named as the category) if the folder exist.
- If the folder does not exist, it will make the folder (inside the <given_path> and named as the category) and move the resume there
- Makes a 'categorized_resumes.csv' file in the <given_path> .
A 'categorized_resumes.csv' file is included in the repsitory inside the 'sample_output' folder which was created after running the script. You can check the difference: before running the script in 'sample_input' and after running the script 'sample_output' folder.
Prerequisites:
- You should (not necessarily) create a virtual environment and activate that
- You must have 'pip' installed
Steps for checking:
- First clone the repository in a folder (eg. <download_folder>)
- Open command line in the <download_folder> folder and Install the necessary packages by running the following command:
'pip install -r requirements.txt' - Run the following command for testing the script:
'python script.py <given_path>' ; Here given path is the path of the folder that contains the resumes - Check in the <given_path> to see the result.
! Important: There is a 'do_not_delete' folder in the repository. This is important for running the script. You know what to do : )