In high-supply job markets, hiring teams are overwhelmed. A single software engineering posting in Nairobi regularly attracts over 800 applications within 48 hours. Most corporate Applicant Tracking Systems (ATS) handle this influx with simplistic keyword filtering: searching for exact string matches like "Docker" or "PostgreSQL".
This naive approach creates two severe problems: 1. Keyword Stuffing Gamers Win: Candidates who paste white-colored text or repetitive buzzwords into their resumes slip past the filter. 2. High-Value Talent Gets Lost: A brilliant engineer who writes "relational database performance tuning" instead of "SQL" is discarded.
To solve this for our client RapidRecruit, we designed an intelligent semantic classification pipeline in Python that parses document structure, vectors skills contextually, and protects candidates through blind evaluation.
1. Multi-Column Document Layout Normalization
Resumes arrive in unpredictable formats: multi-column PDFs, tables, LaTeX exports, and Microsoft Word documents. Traditional OCR or text extractors read across horizontal lines, merging text from Column A and Column B into nonsensical sentences.
We built a layout-aware parsing pipeline using pdfplumber and PyPDF2 that groups text blocks by spatial bounding box coordinates (x0, top, x1, bottom):
# pipeline/extractor.py
import pdfplumber
def extract_structured_text_blocks(pdf_path: str):
blocks = []
with pdfplumber.open(pdf_path) as pdf:
for page_idx, page in enumerate(pdf.pages):
# Extract distinct visual words with spatial coordinates
words = page.extract_words(
x_tolerance=2,
y_tolerance=3,
keep_blank_chars=False
)
# Reconstruct columns by sorting by X-coordinate clusters
sorted_blocks = cluster_into_columns(words)
blocks.extend(sorted_blocks)
return blocksOnce raw text blocks are ordered logically, spaCy's named entity recognition (NER) extracts key entities: Work Experience Timelines, Educational Pedigree, and Core Competencies.
2. Moving Beyond Keywords: TF-IDF and Cosine Similarity
Instead of searching for binary keyword occurrences, we compute Term Frequency-Inverse Document Frequency (TF-IDF) with a customized software ontology:
PostgreSQL $\equiv$ relational database, Expo $\equiv$ React Native) into a normalized skill vector.from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.metrics.pairwise import cosine_similarity
def calculate_candidate_match(job_description: str, candidate_profiles: list):
vectorizer = TfidfVectorizer(
ngram_range=(1, 3), # Unigrams, bigrams, and trigrams
stop_words="english",
max_df=0.85
)
# Vectorize job description alongside all candidate profiles
corpus = [job_description] + [p["clean_text"] for p in candidate_profiles]
tfidf_matrix = vectorizer.fit_transform(corpus)
# Compute cosine similarity between JD (index 0) and each candidate
similarities = cosine_similarity(tfidf_matrix[0:1], tfidf_matrix[1:]).flatten()
return similaritiesThis guarantees that candidates who articulate substantive experience in relevant frameworks are surfaced to the top, regardless of exact jargon phrasing.
3. Mitigating Unconscious Bias Through Blind Evaluation
Research consistently demonstrates that candidate names, photos, gender signifiers, and schools trigger subconscious hiring biases during initial resume triage.
We engineered a zero-bias transformation pipeline:
Candidate #84A).Hiring managers review candidate leaderboards solely on validated skill vectors, project achievements, and work tenure. In the very first quarter of deployment, RapidRecruit's candidate progression diversity increased by 38%.

