예제 #1
0
def test_occupational_scoped_skill_extractor_candidate_skills():
    extractor = SocScopedExactMatchSkillExtractor(sample_ontology())
    candidate_skills = sorted(extractor.candidate_skills(sample_job_posting()),
                              key=lambda cs: cs.skill_name)

    assert candidate_skills[0].skill_name == 'organization'
    assert candidate_skills[
        0].context == 'Organization, Cleanliness, Trainability, team player, good communication skillz, Motivation, a Sense of Responsibility and Pride in your Performance'
    assert candidate_skills[0].confidence == 100
예제 #2
0
def test_occupational_scoped_skill_extractor_candidate_skills():
    with utils.makeNamedTemporaryCSV(sample_skills(), '\t') as skills_filename:
        extractor = SocScopedExactMatchSkillExtractor(
            skill_lookup_path=skills_filename)
        candidate_skills = sorted(extractor.candidate_skills(
            sample_job_posting()),
                                  key=lambda cs: cs.skill_name)

        assert candidate_skills[0].skill_name == 'organization'
        assert candidate_skills[
            0].context == 'Organization, Cleanliness, Trainability, team player, good communication skillz, Motivation, a Sense of Responsibility and Pride in your Performance'
        assert candidate_skills[0].confidence == 100