AI Resume Screener

 AI Resume Screener 

1. Introduction

An AI Resume Screener automates the process of analyzing resumes to extract relevant skills and score candidates based on job requirements. This project demonstrates how to implement such a system using Python and Natural Language Processing (NLP).

2. Prerequisites

• Python: Install Python 3.x from the official Python website.
• Required Libraries:
  - pandas: Install using pip install pandas
  - spacy: Install using pip install spacy
  - nltk: Install using pip install nltk
• Basic knowledge of Python, NLP, and working with data.

3. Project Setup

1. Create a Project Directory:

- Name your project folder, e.g., `ResumeScreener`.
- Inside this folder, create the Python script file (`resume_screener.py`).

2. Install Required Libraries:

Ensure pandas, spacy, and nltk are installed using `pip`.

3. Download Language Models:

   python -m spacy download en_core_web_sm

4. Writing the Code

Below is the Python code for the AI Resume Screener:


import spacy
import pandas as pd
import re

# Load Spacy language model
nlp = spacy.load("en_core_web_sm")

# Sample job description
job_description = """
Required skills: Python, Machine Learning, Data Analysis, Communication, SQL
"""

# Sample resumes
resumes = [
    "Experienced in Python and Data Analysis. Skilled in SQL and Machine Learning.",
    "Expert in Java, Project Management, and Team Leadership. Familiar with SQL.",
    "Proficient in Python and Machine Learning. Strong communication skills."
]

# Extract skills from text
def extract_skills(text):
    skills = re.findall(r"[A-Za-z0-9]+(?: [A-Za-z0-9]+)*", text)
    return [skill.lower() for skill in skills]

# Function to score resumes
def score_resumes(resumes, required_skills):
    scores = []
    for resume in resumes:
        resume_skills = set(extract_skills(resume))
        matched_skills = resume_skills.intersection(required_skills)
        scores.append(len(matched_skills))
    return scores

# Preprocess job description and resumes
required_skills = set(extract_skills(job_description.lower()))
scores = score_resumes(resumes, required_skills)

# Display results
for i, resume in enumerate(resumes):
    print(f"Resume {i + 1}:")
    print(resume)
    print(f"Score: {scores[i]}/{len(required_skills)}")
    print("-" * 40)
   

5. Key Components

• Text Extraction: Extracts and preprocesses skills from job descriptions and resumes.
• Scoring Mechanism: Compares extracted skills with required skills to assign scores.
• NLP Tools: Uses regex and Spacy for text processing and analysis.

6. Testing

1. Prepare Sample Data:

   - Define a job description with required skills.

   - Create a list of sample resumes as strings.

2. Run the script:

   python resume_screener.py

3. Verify the extracted skills and scores for each resume.

7. Enhancements

• Real-World Dataset: Use a larger dataset of resumes and job descriptions.
• Resume Parsing: Integrate libraries like PyPDF2 or textract for extracting text from PDFs.
• Advanced Scoring: Include weights for different skills and incorporate experience levels.

8. Troubleshooting

• Inaccurate Skill Extraction: Refine regex patterns or use advanced NLP models.
• Missing Skills: Ensure job descriptions and resumes are well-formatted.
• Performance Issues: Optimize text processing for larger datasets.

9. Conclusion

This project demonstrates the implementation of an AI Resume Screener to extract skills and score resumes. With advanced features, it can become an integral tool for automating recruitment processes.