Пример #1
0
    def match(self, resume, job):
        imptKeywordSet = set(
            InformationNode.convertStringIntoList(job.getImptKeywords()))
        # print(imptKeywordSet)
        eduResult = 0
        expResult = 0
        resultLocationSet = 0
        resultLang = 0
        resultSkill = 0
        matchedKeywords = []

        if (resume.isSkillsPresent() and job.isSkillsPresent()):
            rskillSet = set(resume.getSkills())
            jskillSet = set(job.getSkills())
            resultSkillSet = rskillSet.intersection(jskillSet)
            resultSkillSet2 = rskillSet.intersection(imptKeywordSet)
            resultSkill = (len(resultSkillSet) + len(resultSkillSet2))
            self.mergeSetIntoList(matchedKeywords,
                                  resultSkillSet.union(resultSkillSet2))
            # print(rskillSet)
            # print(jskillSet)

        if (resume.isLanguagePresent() and job.isLanguagePresent()):
            rLangSet = set(resume.getLanguage())
            jLangSet = set(job.getLanguage())
            resultLangSet = rLangSet.intersection(jLangSet)
            resultLangSet2 = jLangSet.intersection(imptKeywordSet)
            resultLang = (len(resultLangSet) + len(resultLangSet2))
            self.mergeSetIntoList(matchedKeywords,
                                  resultLangSet.union(resultLangSet2))
            # print(rLangSet)
            # print(jLangSet)

        if (resume.isLocationPresent() and job.isLocationPresent()):
            rLocationSet = resume.getLocation().getCountry()
            jLocationSet = job.getLocation().getCountry()
            resultLocationSet = int(rLocationSet == jLocationSet)
            # print(resultLocationSet)

        if (resume.isEducationPresent() and job.isEducationPresent()):
            eduResult = (self.compareEducationBetweenJobandResume(
                resume.getEducation(), job.getEducation()))
            # print(resumeNode.getEducation())
            # print(jobNode.getEducation())
        if (resume.isExperiencePresent() and job.isExperiencePresent()):
            expResult = (self.compareExperienceBetweenJobandResume(
                resume.getExperience(), job.getExperience(),
                InformationNode.convertStringIntoList(job.getImptKeywords()),
                matchedKeywords))

        finalResult = eduResult + expResult + resultLocationSet + resultLang + resultSkill

        new_match = Match(resume, job, finalResult, matchedKeywords)
        print(finalResult)
        print(new_match.getMatchedKeyWords())
        return new_match
Пример #2
0
def main():

    # ###uncomment for resume
    resume = openFile(
        'C:\\xampp\htdocs\CV-Parser-master\data\\input\\resume3.json')
    print(resume)
    resumeNode = ResumeNode("desmond", '97859875', '*****@*****.**', '456',
                            resume)

    ##uncomment for job desc
    content = openFile(
        'C:\\xampp\htdocs\CV-Parser-master\data\input\\jobdesc3.json')
    keywords = openFile(
        'C:\\xampp\htdocs\CV-Parser-master\data\input\keywords1.json')
    # print(resume)
    #
    jobNode = JobDescNode("545646", content, keywords)
    # print(personA.getImptKeywords())

    ResumeProcessor.construct(jobNode)
    ResumeProcessor.construct(resumeNode)

    imptKeywordSet = set(InformationNode.convertStringIntoList(keywords))
    print(imptKeywordSet)
    rskillSet = set(resumeNode.getSkills())
    jskillSet = set(jobNode.getSkills())
    resultSkillSet = rskillSet.intersection(jskillSet)
    resultSkillSet2 = rskillSet.intersection(imptKeywordSet)
    print(rskillSet)
    print(jskillSet)
    print(len(resultSkillSet) + len(resultSkillSet2))
    rLangSet = set(resumeNode.getLanguage())
    jLangSet = set(jobNode.getLanguage())
    resultLangSet = rLangSet.intersection(jLangSet)
    resultLangSet2 = rskillSet.intersection(imptKeywordSet)
    print(rLangSet)
    print(jLangSet)
    print(len(resultLangSet) + len(resultLangSet2))
    rLocationSet = resumeNode.getLocation().getCountry()
    jLocationSet = jobNode.getLocation().getCountry()
    resultLocationSet = int(rLocationSet == jLocationSet)
    print(resultLocationSet)
    print(rLocationSet)
    print(jLocationSet)

    print(resumeNode.getEducation())
    print(jobNode.getEducation())
    print(
        compareEducationBetweenJobandResume(resumeNode.getEducation(),
                                            jobNode.getEducation()))
    print(
        compareExperienceBetweenJobandResume(
            resumeNode.getExperience(), jobNode.getExperience(),
            InformationNode.convertStringIntoList(keywords)))
Пример #3
0
def main():

    # ###uncomment for resume
    resume = openFile("C:\\xampp\htdocs\CV-Parser-master\data\\input\\resume3.json")
    print(resume)
    resumeNode = ResumeNode("desmond", "97859875", "*****@*****.**", "456", resume)

    ##uncomment for job desc
    content = openFile("C:\\xampp\htdocs\CV-Parser-master\data\input\\jobdesc3.json")
    keywords = openFile("C:\\xampp\htdocs\CV-Parser-master\data\input\keywords1.json")
    # print(resume)
    #
    jobNode = JobDescNode("545646", content, keywords)
    # print(personA.getImptKeywords())

    ResumeProcessor.construct(jobNode)
    ResumeProcessor.construct(resumeNode)

    imptKeywordSet = set(InformationNode.convertStringIntoList(keywords))
    print(imptKeywordSet)
    rskillSet = set(resumeNode.getSkills())
    jskillSet = set(jobNode.getSkills())
    resultSkillSet = rskillSet.intersection(jskillSet)
    resultSkillSet2 = rskillSet.intersection(imptKeywordSet)
    print(rskillSet)
    print(jskillSet)
    print(len(resultSkillSet) + len(resultSkillSet2))
    rLangSet = set(resumeNode.getLanguage())
    jLangSet = set(jobNode.getLanguage())
    resultLangSet = rLangSet.intersection(jLangSet)
    resultLangSet2 = rskillSet.intersection(imptKeywordSet)
    print(rLangSet)
    print(jLangSet)
    print(len(resultLangSet) + len(resultLangSet2))
    rLocationSet = resumeNode.getLocation().getCountry()
    jLocationSet = jobNode.getLocation().getCountry()
    resultLocationSet = int(rLocationSet == jLocationSet)
    print(resultLocationSet)
    print(rLocationSet)
    print(jLocationSet)

    print(resumeNode.getEducation())
    print(jobNode.getEducation())
    print(compareEducationBetweenJobandResume(resumeNode.getEducation(), jobNode.getEducation()))
    print(
        compareExperienceBetweenJobandResume(
            resumeNode.getExperience(), jobNode.getExperience(), InformationNode.convertStringIntoList(keywords)
        )
    )
Пример #4
0
 def identifyFields(self, node):
     content = InformationNode.convertStringIntoList(node.getContent())
     firstIndex = -1
     self.segmentResume(node, content)
     self.contentHeadingIndex = sorted(set(self.contentHeadingIndex), key=self.contentHeadingIndex.index)
     self.getStartEndLocationResume(node, content)
     print(self.contentHeadingIndex)
Пример #5
0
    def match(self, resume, job):
        imptKeywordSet = set(InformationNode.convertStringIntoList(job.getImptKeywords()))
        # print(imptKeywordSet)
        eduResult = 0
        expResult = 0
        resultLocationSet = 0
        resultLang = 0
        resultSkill = 0
        matchedKeywords = []

        if(resume.isSkillsPresent() and job.isSkillsPresent()):
            rskillSet = set(resume.getSkills())
            jskillSet = set(job.getSkills())
            resultSkillSet = rskillSet.intersection(jskillSet)
            resultSkillSet2 = rskillSet.intersection(imptKeywordSet)
            resultSkill = (len(resultSkillSet) + len(resultSkillSet2))
            self.mergeSetIntoList(matchedKeywords, resultSkillSet.union(resultSkillSet2))
            # print(rskillSet)
            # print(jskillSet)

        if(resume.isLanguagePresent() and job.isLanguagePresent()):
            rLangSet = set(resume.getLanguage())
            jLangSet = set(job.getLanguage())
            resultLangSet = rLangSet.intersection(jLangSet)
            resultLangSet2 = jLangSet.intersection(imptKeywordSet)
            resultLang = (len(resultLangSet) + len(resultLangSet2))
            self.mergeSetIntoList(matchedKeywords, resultLangSet.union(resultLangSet2))
            # print(rLangSet)
            # print(jLangSet)

        if (resume.isLocationPresent()  and job.isLocationPresent()):
            rLocationSet = resume.getLocation().getCountry()
            jLocationSet = job.getLocation().getCountry()
            resultLocationSet = int(rLocationSet == jLocationSet)
            # print(resultLocationSet)

        if(resume.isEducationPresent() and job.isEducationPresent()):
            eduResult = (self.compareEducationBetweenJobandResume(resume.getEducation(), job.getEducation()))
            # print(resumeNode.getEducation())
            # print(jobNode.getEducation())
        if(resume.isExperiencePresent() and job.isExperiencePresent()):
            expResult = (self.compareExperienceBetweenJobandResume(resume.getExperience(), job.getExperience(),InformationNode.convertStringIntoList(job.getImptKeywords()), matchedKeywords))


        finalResult = eduResult + expResult +resultLocationSet + resultLang + resultSkill

        new_match = Match(resume, job, finalResult, matchedKeywords)
        print(finalResult)
        print(new_match.getMatchedKeyWords())
        return new_match
Пример #6
0
 def __init__(self, input):
     self.content = InformationNode.convertStringIntoList(input)
     self.extractedContent = set()
Пример #7
0
 def __init__(self, input):
     self.content = InformationNode.convertStringIntoList(input)
     self.extractedContent = set()