Skip to content

Basic Scorer

BasicScorer

BasicScorer()

Bases: BaseScorer

Basic ATS scorer that evaluates resumes using keyword and skills matching.

This scorer provides a lightweight alternative to ProScorer, focusing on: - Keyword matching (40% weight): Matches keywords from job description - Skills matching (60% weight): Matches required and preferred skills

The BasicScorer does not use machine learning models, making it faster and requiring fewer dependencies. It's ideal for: - Quick scoring without ML overhead - Environments without GPU support - Basic keyword/skills matching requirements

Attributes:

Name Type Description
keyword_analyzer

Analyzer for keyword matching

skills_analyzer

Analyzer for skills matching

weights

Dictionary mapping score categories to their weights

Example
scorer = BasicScorer()
result = scorer.score(resume_data, job_description)
print(f"Overall score: {result.overall_score}")
print(f"Keyword score: {result.breakdown.keyword_score}")
print(f"Skills score: {result.breakdown.skills_score}")

Initialize the BasicScorer with default analyzers and weights.

Source code in at_scorer/scorers/basic.py
def __init__(self):
    """Initialize the BasicScorer with default analyzers and weights."""
    self.keyword_analyzer = KeywordAnalyzer()
    self.skills_analyzer = SkillsAnalyzer()
    self.weights = {"keyword": 0.4, "skills": 0.6}

Functions

score
score(resume, job)

Score a resume against a job description using basic keyword and skills matching.

This method performs a lightweight analysis focusing on: 1. Keyword matching: Checks if job keywords appear in the resume 2. Skills matching: Compares required and preferred skills with resume skills

The final score is a weighted combination of these two factors.

Parameters:

Name Type Description Default
resume ResumeData

The resume data to be scored.

required
job JobDescription

The job description to score against (structured or text-based).

required

Returns:

Type Description
ScoreResult

ScoreResult containing: - overall_score: Weighted score (0-100) combining keyword (40%) and skills (60%) - breakdown: Individual scores for keywords and skills - recommendations: Suggestions for missing keywords and skills - matched_keywords: Keywords found in the resume - matched_skills: Skills that match job requirements (required + preferred) - missing_skills: Required skills not found in the resume

Source code in at_scorer/scorers/basic.py
def score(self, resume: ResumeData, job: JobDescription) -> ScoreResult:
    """Score a resume against a job description using basic keyword and skills matching.

    This method performs a lightweight analysis focusing on:
    1. Keyword matching: Checks if job keywords appear in the resume
    2. Skills matching: Compares required and preferred skills with resume skills

    The final score is a weighted combination of these two factors.

    Args:
        resume: The resume data to be scored.
        job: The job description to score against (structured or text-based).

    Returns:
        ScoreResult containing:
            - overall_score: Weighted score (0-100) combining keyword (40%) and skills (60%)
            - breakdown: Individual scores for keywords and skills
            - recommendations: Suggestions for missing keywords and skills
            - matched_keywords: Keywords found in the resume
            - matched_skills: Skills that match job requirements (required + preferred)
            - missing_skills: Required skills not found in the resume
    """
    job_struct = self._normalize_job(job)
    resume_text = resume.aggregate_text()

    keyword_score, matched_keywords, missing_keywords = self.keyword_analyzer.analyze(
        resume_text, job_struct.keywords
    )
    (
        skills_score,
        matched_skills,
        missing_skills,
        matched_preferred,
    ) = self.skills_analyzer.analyze(
        resume.skills,
        job_struct.required_skills,
        job_struct.preferred_skills,
    )

    overall = weighted_score(
        {"keyword": keyword_score, "skills": skills_score},
        self.weights,
    )

    breakdown = ScoreBreakdown(
        keyword_score=keyword_score * 100,
        skills_score=skills_score * 100,
    )

    recommendations = self._recommendations(missing_keywords, missing_skills)

    return ScoreResult(
        overall_score=self._to_score_int(overall),
        breakdown=breakdown,
        recommendations=recommendations,
        matched_keywords=matched_keywords,
        matched_skills=matched_skills + matched_preferred,
        missing_skills=missing_skills,
    )