Пример #1
0
def sectionScore(resume):
    section_tokens = tokenize.input_file_words(resume, [])
    currentIndex = -1
    wordCount = [0, 0, 0]
    for x in section_tokens:
        x = x.lower()
        if (x.strip("!@#$%^&*()_+|}{:?")
                in ["work experience", "employment", "experience"]
                and currentIndex != 0):
            currentIndex = 0
        elif (x.strip("!@#$%^&*()_+|}{:?")
              in ["publications", "projects", "research"]
              and currentIndex != 1):
            currentIndex = 1
        elif (x.strip("!@#$%^&*()_+|}{:?")
              in ["leadership", "leadership experience"]
              and currentIndex != 2):
            currentIndex = 2
        elif (x.strip("!@#$%^&*()_+|}{:?") in [
                "education", "activites", "skils", "interests",
                "extracurricular", "honors", "references", "awards",
                "acheivements"
        ]):
            currentIndex = -1
        else:
            wordCount[currentIndex] += 1

    return min(((sum(wordCount) - min(wordCount))) / 450.0, 1.0) * 10
Пример #2
0
def main(resume, cats):
    tokens = tokenize.input_file_lines(resume, [])
    word_tokens = tokenize.input_file_words(resume, [])
    score = 0

    email = ""
    for token in word_tokens:
        if "@" in token:
            email = token
            break

    fout = open("results.tex", "a")
    fout.write("\\section{" + email + "}\n")
    fout.close()
    (cat, category_score) = category(resume, cats[0], cats[1], cats[2],
                                     cats[3], cats[4], cats[5])
    overall_score = overall(resume)
    programming_score = programmingScore(resume)
    gpa_score = gpaScore(word_tokens)
    college_score = collegeScore(word_tokens)
    word_count_score = wordCountScore(tokens)
    degree_score = degreeScore(word_tokens)
    section_score = sectionScore(resume)

    print "Finished parsing."
    score = category_score + overall_score + programming_score + \
            gpa_score + college_score + word_count_score + \
            degree_score + section_score

    fout = open("results.tex", "a")
    fout.write("\\textbf{Best category: } " + cat + "\\\\\n\
\\textbf{Overall Score: }" + str(score / 10.0) + " (out of 10)")
    fout.close()

    return (cat, score, email)
Пример #3
0
def main(resume, cats):
    # initialize variables
    # have the words as tokens in a list
    tokens = tokenize.input_file_lines(resume, [])
    word_tokens = tokenize.input_file_words(resume, [])
    score = 0

    # get email
    email = ""
    for token in word_tokens:
        if "@" in token:
            email = token
            break

    fout = open("results.tex", "a")
    fout.write("\\section{" + email + "}\n")
    fout.close()
    # category score
    (cat, category_score) = category(resume, cats[0], cats[1], cats[2],
                                     cats[3], cats[4], cats[5])

    # overall score
    overall_score = overall(resume)

    # programming languages score
    programming_score = programmingScore(resume)

    # GPA score
    # gpa_score = gpaScore(word_tokens)

    # university score
    college_score = collegeScore(word_tokens)

    # word count score
    word_count_score = wordCountScore(tokens)

    # degree score
    # degree_score = degreeScore(word_tokens)

    # sectional score
    section_score = sectionScore(resume)

    print("Finished parsing")
    score = category_score + overall_score + programming_score + college_score + section_score

    #hiring condition
    if score > 60.00:
        ans = "Selected"
    else:
        ans = "Not Selected"

    fout = open("results.tex", "a")
    fout.write("\\textbf{Best category: } " + cat + "\\\\\n\
\\textbf{Overall Score: }" + str(score / 10.0) + " (out of 10)")
    fout.close()

    return (cat, score, email, ans)
Пример #4
0
def main(resume, cats):
    # initialize variables 
    # have the words as tokens in a list
    tokens = tokenize.input_file_lines(resume,[])
    word_tokens = tokenize.input_file_words(resume,[])
    score = 0


    
    # get email
    email = ""
    for token in word_tokens:
        if "@" in token:
            email = token
            break


    fout = open("results.tex", "a")
    fout.write("\\section{" + email +"}\n")
    fout.close()
    # category score
    (cat, category_score) = category(resume, cats[0],cats[1],cats[2],cats[3],cats[4],cats[5])

    # overall score
    overall_score = overall(resume)

    # programming languages score
    programming_score = programmingScore(resume)

    # GPA score
    gpa_score = gpaScore(word_tokens)

    # university score
    college_score = collegeScore(word_tokens)

    # word count score
    word_count_score = wordCountScore(tokens)

    # degree score
    degree_score = degreeScore(word_tokens)

    # sectional score
    section_score = sectionScore(resume)

    print "Finished parsing."
    score = category_score + overall_score + programming_score + \
            gpa_score + college_score + word_count_score + \
            degree_score + section_score

    
    fout = open("results.tex", "a")
    fout.write("\\textbf{Best category: } "+cat+"\\\\\n\
\\textbf{Overall Score: }"+ str(score/ 10.0) + " (out of 10)")
    fout.close()

    return (cat, score, email)
Пример #5
0
def sectionScore(resume):
    section_tokens = tokenize.input_file_words(resume,[])
    currentIndex = -1
    wordCount = [0,0,0]
    for x in section_tokens: 
        x = x.lower()
        if(x.strip("!@#$%^&*()_+|}{:?") in ["work experience", "employment", "experience"] and currentIndex != 0):
            currentIndex = 0
        elif(x.strip("!@#$%^&*()_+|}{:?") in ["publications", "projects", "research"] and currentIndex != 1):
            currentIndex = 1
        elif(x.strip("!@#$%^&*()_+|}{:?") in ["leadership","leadership experience"] and currentIndex != 2):
            currentIndex = 2    
        elif(x.strip("!@#$%^&*()_+|}{:?") in ["education","activites","skils", "interests", "extracurricular", "honors", "references", "awards", "acheivements"]):
            currentIndex = -1
        else:
            wordCount[currentIndex] += 1

    return  min(((sum(wordCount) - min(wordCount))) / 450.0, 1.0) * 10