Skip to content

Base Scorer

BaseScorer

Bases: ABC

Abstract base class for resume scoring algorithms.

All scorer implementations must inherit from this class and implement the score method. This class provides common utilities for normalizing job descriptions and converting scores to integer values.

Example
class CustomScorer(BaseScorer):
    def score(self, resume: ResumeData, job: JobDescription) -> ScoreResult:
        # Implementation here
        pass

Functions

score abstractmethod
score(resume, job)

Score a resume against a job description.

This is the main method that all scorer implementations must provide. It analyzes the resume data against the job requirements and returns a comprehensive score result.

Parameters:

Name Type Description Default
resume ResumeData

The resume data to be scored, containing skills, experience, education, certifications, and other relevant information.

required
job JobDescription

The job description to score against. Can be either structured (JobDescriptionStructured) or text-based (JobDescriptionText).

required

Returns:

Type Description
ScoreResult

ScoreResult containing: - overall_score: Integer score from 0-100 - breakdown: Detailed scores for each category - recommendations: Actionable suggestions for improvement - matched_keywords: Keywords found in the resume - matched_skills: Skills that match the job requirements - missing_skills: Required skills not found in the resume

Raises:

Type Description
NotImplementedError

If the method is not implemented by a subclass.

Source code in at_scorer/scorers/base.py
@abstractmethod
def score(self, resume: ResumeData, job: JobDescription) -> ScoreResult:
    """Score a resume against a job description.

    This is the main method that all scorer implementations must provide.
    It analyzes the resume data against the job requirements and returns
    a comprehensive score result.

    Args:
        resume: The resume data to be scored, containing skills, experience,
            education, certifications, and other relevant information.
        job: The job description to score against. Can be either structured
            (JobDescriptionStructured) or text-based (JobDescriptionText).

    Returns:
        ScoreResult containing:
            - overall_score: Integer score from 0-100
            - breakdown: Detailed scores for each category
            - recommendations: Actionable suggestions for improvement
            - matched_keywords: Keywords found in the resume
            - matched_skills: Skills that match the job requirements
            - missing_skills: Required skills not found in the resume

    Raises:
        NotImplementedError: If the method is not implemented by a subclass.
    """
    ...