BrandMint Academy
Explore guided AI learning and mentoring after choosing your foundations.
AI Campus • Supporting resources
Run a real local baseline on two text files, then extend it with PDF extraction or a web interface.
Beginner · 45–90 minutes
Cost: Python standard library only. No API key, paid account or model download.
The ZIP includes the Python code, a README, sample files where needed, and a check you can run. No API key or paid service is needed for this baseline.
Download starter ZIPExtract the ZIP, open its folder in a terminal and follow README.md. Start with python test_starter.py.
Write “Built Python and SQL projects.” in resume.txt. Put Python, SQL and Docker on separate lines in requirements.txt. Keep every requirement explicit.
Save resume_matcher.py in the same folder. The code compares word sequences and returns evidence snippets; it does not call an AI service.
Run python resume_matcher.py resume.txt requirements.txt. Expect Python and SQL matched, Docker missing, and a custom coverage of 66.7%.
Empty requirements.txt and run again: the program must reject the empty requirement set instead of dividing by zero or showing a perfect score.
Add PDF extraction only after this baseline works. Write a README with inputs, actual output, limitations and a screenshot. Do not publish a real resume or personal contact details.
import argparse
import json
import re
from pathlib import Path
def tokens(text):
return re.findall(r"[\w+#]+", text.casefold())
def match_resume(resume, requirements):
required = list(dict.fromkeys(line.strip() for line in requirements.splitlines() if line.strip()))
if not required or any(not tokens(term) for term in required):
raise ValueError("Add at least one skill using letters or numbers.")
sentences = [line.strip() for line in re.split(r"[.\n]", resume) if line.strip()]
matched, missing = [], []
for term in required:
target = tokens(term)
evidence = next((line for line in sentences if any(tokens(line)[i:i+len(target)] == target for i in range(len(tokens(line))))), None)
if evidence:
matched.append({"requirement": term, "evidence": evidence})
else:
missing.append(term)
return {"custom_coverage_percent": round(100*len(matched)/len(required), 1), "matched": matched, "missing": missing, "limitation": "Keyword overlap only; not an ATS or hiring score."}
def main():
parser = argparse.ArgumentParser(description="Compare resume text with explicit requirements")
parser.add_argument("resume", type=Path)
parser.add_argument("requirements", type=Path)
args = parser.parse_args()
try:
result = match_resume(args.resume.read_text(encoding="utf-8"), args.requirements.read_text(encoding="utf-8"))
print(json.dumps(result, indent=2, ensure_ascii=False))
except (OSError, UnicodeError, ValueError) as error:
parser.exit(1, str(error) + "\n")
if __name__ == "__main__":
main()
python resume_matcher.py resume.txt requirements.txtJSON reports matched terms, source snippets, missing requirements and a custom coverage percentage. The example produces 66.7%.
A transparent keyword-overlap exercise, not an employer ATS score, hiring recommendation or semantic AI evaluation. It does not read PDFs until you add that capability.
Learn and build with BrandMint AI
Explore AI news, tools and skills on AI Campus. When you want to learn further, choose BrandMint AI courses, mentoring or learning apps below.
AI Campus guides are free. Check each platform for course fees and availability.
Learn AI foundations or develop practical software skills.
Explore guided AI learning and mentoring after choosing your foundations.
Follow a practical path to building AI-assisted websites and applications.
Practise AI skills or explore CBSE learning support.
Continue practising with the WhatsLearn learning application.
Explore academic learning support for CBSE students.
Build a portfolio through creative and practical learning.
Build a digital marketing portfolio through AI-assisted practical work.
Develop a story, storyboard and short-film portfolio with AI-assisted workflows.
Essential cookies keep the site working. Language and subscription preferences stay on your device. We do not currently use optional analytics or advertising cookies.
Details and settings