Build This Project · AI Portfolio
AI-Powered Resume Analyzer — Complete Project Guide
Decide who the tool is for
Before writing code, choose your user, because it changes the design. A recruiter-side tool ranks many candidates for one job, which raises serious fairness questions (covered below). A candidate-side tool takes one resume and one job description and says "these skills match, these are missing, here is how close you are". The candidate-side version is a better portfolio project: it is useful, easy to demo, and avoids automated decisions about people. That is the version built here.
What the finished project does
- Accepts a resume (PDF or text) and a pasted job description.
- Extracts skills from both using a skills list.
- Calculates an overall text similarity score.
- Shows matched skills, missing skills and the score, with suggestions.
Step 1: The matching engine in plain Python
Two ideas do most of the work. Skill extraction looks for known skills (a curated list) in the text. TF-IDF with cosine similarity turns each document into a vector of word weights, where words that are frequent in a document but rare across all documents get higher weight, and then measures the angle between vectors: 1 means the same direction, 0 means no shared words. The code below uses only the standard library so every step is visible:
import math
import re
from collections import Counter
SKILLS = {"python", "sql", "excel", "power bi", "tableau", "pandas",
"statistics", "machine learning", "aws", "git"}
def tokens(text):
return re.findall(r"[a-z]+", text.lower())
def skills_in(text):
t = " " + " ".join(tokens(text)) + " "
return {s for s in SKILLS if f" {s} " in t}
def tfidf_vectors(docs):
tok = [Counter(tokens(d)) for d in docs]
n = len(docs)
df = Counter(w for c in tok for w in c)
idf = {w: math.log((1 + n) / (1 + df[w])) + 1 for w in df} # smoothed idf
return [{w: tf * idf[w] for w, tf in c.items()} for c in tok]
def cosine(a, b):
dot = sum(a[w] * b.get(w, 0) for w in a)
na = math.sqrt(sum(v * v for v in a.values()))
nb = math.sqrt(sum(v * v for v in b.values()))
return dot / (na * nb)
job = "Data analyst: strong SQL and Excel, Power BI dashboards, Python with pandas, basic statistics."
resumes = {
"Ananya": "Built Power BI dashboards on sales data; SQL joins and window functions; Excel pivot tables; Python pandas cleaning.",
"Rahul": "Java developer, Spring Boot microservices, REST APIs, Git, AWS deployment.",
"Farah": "MBA intern: Excel reports, Tableau charts, some SQL; learning Python.",
}
vecs = tfidf_vectors([job] + list(resumes.values()))
need = skills_in(job)
for (name, text), vec in zip(resumes.items(), vecs[1:]):
have = skills_in(text)
print(f"{name:<7} match={cosine(vecs[0], vec):.2f} "
f"skills {len(need & have)}/{len(need)} missing: {', '.join(sorted(need - have)) or '-'}")
Output:
Ananya match=0.42 skills 5/6 missing: statistics
Rahul match=0.00 skills 0/6 missing: excel, pandas, power bi, python, sql, statistics
Farah match=0.14 skills 3/6 missing: pandas, power bi, statistics
Reading the result: Ananya's resume shares many weighted words with the job and five of six required skills, missing only statistics, so the tool can tell her to add evidence of statistics work if she has it. Rahul is a backend developer; zero overlap is the correct answer for a data analyst job. Farah has three skills but uses different words (Tableau rather than Power BI), which shows the main weakness of word matching: it does not know that two tools do similar jobs.
Two details matter. The skills check pads the text with spaces so that multi-word skills like "power bi" match but "sql" does not match inside another word. And the IDF is "smoothed" (the + 1 terms) so that a word appearing in every document still gets a small positive weight instead of zero or a division error.
Step 2: Read real resumes
Resumes arrive as PDF or DOCX. Libraries such as pypdf or pdfplumber (PDF) and python-docx (Word) extract the text. Expect problems: two-column layouts come out in the wrong order, tables lose structure, and scanned PDFs contain no text at all (they need OCR). Handle these cases explicitly and tell the user when extraction looks poor, for example when fewer than 50 words come out of a two-page file.
For test data, Kaggle has resume datasets labelled by job category; check each dataset's licence, and never upload real people's resumes to a public demo.
Step 3: Upgrade matching with embeddings
To fix the Tableau versus Power BI problem, replace TF-IDF vectors with sentence embeddings from a pre-trained model (for example a small model from the sentence-transformers library). Embeddings place texts with similar meaning close together even when the words differ. Keep the skills list as well: embeddings give a fuzzy overall score, while the explicit skills list gives an explanation the user can act on. Showing both is more honest than one opaque number.
An optional extra is to send the missing skills and the job description to a large language model and ask for suggestions phrased as advice, not as rewritten experience the candidate does not have. If you add this, show the prompt in your README and keep a rule that the tool never invents achievements.
Step 4: A simple interface
Streamlit or Gradio turn the engine into a web app in a few dozen lines: a file uploader, a text box for the job description, a button, and a results panel with the score, two skill lists (matched and missing) and suggestions. Deploy it on a free tier such as Streamlit Community Cloud or Hugging Face Spaces so reviewers can try it.
Step 5: Test it like a product
- Build a small labelled test set: 10 job descriptions and 3–4 resumes each, marked "good fit / partial / poor fit" by you. Check that scores rank them sensibly.
- Try edge cases: an empty file, a scanned PDF, a resume in Hindi, a job description of only five words.
- Check that formatting tricks (white text stuffed with keywords) do not inflate scores. If they do, say so as a known limitation.
Fairness and limits: put this in your README
Automated screening can reproduce bias. A model trained on past hiring decisions learns whatever patterns those decisions contained, including ones linked to gender, college name or location rather than ability. Even simple keyword matching penalises people who describe the same skill in different words, which often means candidates from non-traditional backgrounds. That is why this project is designed as feedback for candidates, not as a filter that rejects people. If you build a recruiter-side version, keep a human in every decision, avoid features that act as proxies for protected characteristics, and measure score differences across groups in your test set. Writing this section well signals more maturity to an interviewer than an extra model.
Presenting the project
- A short demo video or GIF and the live link.
- An architecture sketch: upload, text extraction, skills extraction, similarity, UI.
- Your evaluation table and the limitations above.
- What you would do next: section-aware parsing (experience vs education), a larger skills taxonomy, or multilingual support.
For more NLP practice, see NLP projects for beginners and the customer sentiment tracker. If you want a retrieval-based project next, the RAG customer support assistant builds on the same similarity ideas. Other options are listed in AI project ideas for final-year students.