Skip to content

Experience Analyzer

ExperienceAnalyzer

ExperienceAnalyzer(semantic_matcher=None)

Analyzer for work experience evaluation.

Evaluates work experience in two dimensions: 1. Years of experience: Compares total years against requirement 2. Job title relevance: Semantic matching of past job titles

Attributes:

Name Type Description
semantic_matcher

Optional semantic matcher for job title matching.

Example
analyzer = ExperienceAnalyzer(semantic_matcher=matcher)
years_score, title_score = analyzer.analyze(
    work_experience, required_years=5.0, target_title="Senior Engineer"
)

Initialize the experience analyzer.

Parameters:

Name Type Description Default
semantic_matcher SemanticMatcher | None

Optional semantic matcher for job title matching.

None
Source code in at_scorer/analyzers/experience.py
def __init__(self, semantic_matcher: SemanticMatcher | None = None):
    """Initialize the experience analyzer.

    Args:
        semantic_matcher: Optional semantic matcher for job title matching.
    """
    self.semantic_matcher = semantic_matcher

Functions

analyze
analyze(experiences, required_years, target_title)

Analyze work experience against job requirements.

Parameters:

Name Type Description Default
experiences list[WorkExperienceEntry]

List of work experience entries from resume.

required
required_years float | None

Required years of experience (None if not specified).

required
target_title str | None

Target job title for relevance matching (None if not specified).

required

Returns:

Type Description
tuple[float, float]

Tuple containing: - years_score: Score for years of experience (0.0-1.0) - title_score: Score for job title relevance (0.0-1.0)

Source code in at_scorer/analyzers/experience.py
def analyze(
    self,
    experiences: list[WorkExperienceEntry],
    required_years: float | None,
    target_title: str | None,
) -> tuple[float, float]:
    """Analyze work experience against job requirements.

    Args:
        experiences: List of work experience entries from resume.
        required_years: Required years of experience (None if not specified).
        target_title: Target job title for relevance matching (None if not specified).

    Returns:
        Tuple containing:
            - years_score: Score for years of experience (0.0-1.0)
            - title_score: Score for job title relevance (0.0-1.0)
    """
    total_years = sum(_parse_duration_years(exp.duration) for exp in experiences)
    if required_years:
        years_score = min(1.0, total_years / required_years)
    else:
        years_score = 1.0 if total_years > 0 else 0.0

    title_score = self._title_relevance(experiences, target_title) if target_title else 0.0
    return years_score, title_score