r/learnpython • • 17d ago

How should I approach building a simple ATS-style CV scorer in Python?

I work in data and I’m comfortable with pandas and SQL, but I want to build something closer to a real-world application to push my Python further. My idea is a small tool that reads CVs (PDFs), extracts the text, and scores them against a job description.

What I’ve planned so far

  • Extract text from PDFs (looking at pdfplumber or PyPDF2)
  • Clean the text and pull out skills using keyword matching
  • Compare it to the job description (TF-IDF and cosine similarity in scikit-learn)

Where I’m unsure

  • Is keyword matching enough, or should I try spaCy or embeddings?
  • How do you handle CVs with tables, columns, or odd formatting that break PDF extraction?
  • How would you structure the project so it isn’t one long script?

Any advice, library suggestions, or things you’d do differently? Thanks!

1 Upvotes

1 comment sorted by

1

u/Discordbothost 17d ago

your plan is honestly a solid v1. tf-idf + cosine will get you surprisingly far, the main weakness is synonyms ("k8s" vs "kubernetes", "ml" vs "machine learning"). i'd add a small hand-made synonym map before reaching for spacy, then try sentence-transformers (all-MiniLM-L6-v2 is tiny) as a second score and compare the two.

for the pdf mess, pdfplumber struggles with two-column layouts because it reads straight across the page. PyMuPDF's page.get_text("blocks") gives you text blocks with coordinates, so you can sort by column then by y and it fixes most of them. tables you mostly just have to accept will be noisy.

structure wise something like extract.py / normalize.py / score.py with a tiny cli.py on top, each one taking plain strings or dicts so you can test them separately. and grab 10 real cvs you've ranked by hand first, otherwise you can't tell if a change made the scorer better or just different