Employment Inference
Career listings use different titles and conventions to describe employment types. One source may explicitly label a position as an internship, while another may describe it through the role title or other listing metadata. Employment inference provides a way to determine a normalized employment category from the information available to Careers Engine. This logic belongs to the data-processing layer rather than to individual source adapters or publishing components.Why Employment Inference Matters
A common employment category makes job records more consistent across sources. It also gives downstream components a predictable field to use without interpreting every source’s original representation. The canonicalJob model includes an employment_type field, with EmploymentType.INTERN as its default value.
The model therefore provides a consistent representation for employment classification, while inference rules can be extended as source coverage and requirements evolve.
How It Fits into the Pipeline
Employment classification is part of transforming source-specific listings into normalized job records.- A source adapter retrieves listing data.
- The relevant parser extracts job fields.
- Employment information is interpreted according to the application’s classification rules.
- The resulting category is represented in the canonical
Jobmodel. - Downstream components consume the normalized record.
Employment Categories
The supported categories are defined by the application’sEmploymentType model.
The category assigned to a listing depends on the information available to the implementation. Explicit source metadata can provide a direct classification, while title-based or other rule-based inference may be used where supported.
Classification should not assume that every listing provides complete or unambiguous employment information.
Rule-Based Classification
Employment classification rules provide a maintainable way to handle differences in how sources describe opportunities. Keeping these rules separate from source retrieval and message formatting makes it possible to refine classification behavior without redesigning the ingestion or publishing pipeline. When adding or modifying a rule, consider:- Which source fields the rule evaluates.
- Whether the match is sufficiently specific.
- Whether the rule conflicts with existing classifications.
- What happens when the available information is incomplete.
- Whether the behavior is covered by tests.
employment.py. It evaluates job titles against configured keyword groups and returns the corresponding EmploymentType.
The current rules check for internship, new-graduate, apprenticeship, and contract keywords, in that order. If no rule matches, the function defaults to FULL_TIME.
See the infer_employment_type() implementation for the exact matching behavior.

