Skip to content

Score Models

score

Data models for scoring results.

This module defines the result structures returned by scorer implementations, including overall scores, detailed breakdowns, and recommendations.

Classes

ScoreBreakdown dataclass
ScoreBreakdown(
    keyword_score=0.0,
    skills_score=0.0,
    experience_score=None,
    education_score=None,
    certification_score=None,
    location_score=None,
    job_title_score=None,
    achievements_score=None,
    summary_score=None,
)

Detailed breakdown of scores by category.

Contains individual scores for each evaluation category. Scores are represented as floats from 0.0 to 100.0. Categories not evaluated by a particular scorer will be None.

Attributes:

Name Type Description
keyword_score float

Score for keyword matching (0-100).

skills_score float

Score for skills matching (0-100).

experience_score float | None

Score for experience matching (0-100) or None.

education_score float | None

Score for education matching (0-100) or None.

certification_score float | None

Score for certification matching (0-100) or None.

location_score float | None

Score for location matching (0-100) or None.

job_title_score float | None

Score for job title relevance (0-100) or None.

achievements_score float | None

Score for achievements analysis (0-100) or None.

summary_score float | None

Score for executive summary relevance (0-100) or None.

Recommendation dataclass
Recommendation(
    category, priority, message, actionable_items
)

Actionable recommendation for improving resume score.

Provides specific suggestions to help improve the resume's match with the job description.

Attributes:

Name Type Description
category str

Category of the recommendation (e.g., "keywords", "skills").

priority str

Priority level ("low", "medium", or "high").

message str

Human-readable recommendation message.

actionable_items list[str]

List of specific items to address (e.g., missing skills).

ScoreResult dataclass
ScoreResult(
    overall_score,
    breakdown,
    recommendations,
    matched_keywords,
    matched_skills,
    missing_skills,
)

Complete scoring result from a resume evaluation.

This is the main result object returned by scorer implementations. It contains the overall score, detailed breakdown, recommendations, and matching information.

Attributes:

Name Type Description
overall_score int

Overall ATS score from 0-100 (integer).

breakdown ScoreBreakdown

Detailed scores for each category.

recommendations list[Recommendation]

List of actionable recommendations for improvement.

matched_keywords list[str]

Keywords from job description found in the resume.

matched_skills list[str]

Skills from job requirements found in the resume (includes both required and preferred).

missing_skills list[str]

Required skills from job description not found in the resume.

Example
result = scorer.score(resume, job)
print(f"Score: {result.overall_score}/100")
print(f"Skills match: {result.breakdown.skills_score:.1f}%")
for rec in result.recommendations:
    print(f"{rec.priority}: {rec.message}")