This is a Flask-based API that scores resumes based on their similarity to a provided job description. The API uses various similarity metrics, including TF-IDF, Sentence Transformer, Levenshtein, Euclidean distance, Spacy, and Simhash to calculate an ensemble score for each resume.
Python 3.6 or later
Flask
PyPDF2
nltk
pdfplumber
sentence-transformers
spacy
simhash
pdf2image (optional, for PDF image extraction)
-
Clone this repository to your local machine.
-
Create a virtual environment and activate it:
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
- Install the required dependencies:
pip install -r requirements.txt
- Run the Flask app:
python app.py
The API will start on http://localhost:5000.
Send a POST request to http://localhost:5000/process_data with the following parameters:
- job_description: The job description PDF file.
- resume_files[]: An array of resume PDF files.
The app.py file contains configuration options for different similarity metrics and their weights. You can adjust these weights and metrics to fine-tune the scoring process.
The output_folder variable defines the directory where temporary files and processed text files will be stored.
The response time of the API is logged and provided in the JSON response.