Example #1
0
def test_exactmatch_skill_extractor():
    competency_framework = CompetencyFramework(
        name='test_competencies',
        description='Test competencies',
        competencies=[
            Competency(identifier='2.a.1.a', name='Reading Comprehension'),
            Competency(identifier='2.a.1.b', name='Active Listening'),
        ])
    extractor = ExactMatchSkillExtractor(competency_framework)
    assert competency_framework.name in extractor.name
    assert competency_framework.description in extractor.description

    result = [
        extractor.document_skill_counts({'description': doc}) for doc in [
            'this is a job that needs active listening',
            'this is a reading comprehension job',
            'this is an active and reading listening job',
            'this is a reading comprehension and active listening job',
        ]
    ]

    assert result == [
        Counter({'active listening': 1}),
        Counter({'reading comprehension': 1}),
        Counter(),
        Counter({
            'active listening': 1,
            'reading comprehension': 1
        })
    ]
Example #2
0
def sample_framework():
    return CompetencyFramework(
        name='sample_framework',
        description='A few basic competencies',
        competencies=[
            Competency(identifier='a', name='Reading Comprehension'),
            Competency(identifier='b', name='Active Listening'),
        ]
    )
Example #3
0
def sample_framework():
    return CompetencyFramework(name='Sample Framework',
                               description='A few basic competencies',
                               competencies=[
                                   Competency(identifier='a',
                                              name='Organization'),
                                   Competency(identifier='b',
                                              name='Communication Skills'),
                                   Competency(identifier='c', name='Cooking')
                               ])