commit 8faf90f3584f96220371ada2a851709a57a44da8 Author: talksik Date: Sat Dec 12 13:28:46 2020 -0500 Initial commit diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/.DS_Store differ diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..dfe0770 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# Auto detect text files and perform LF normalization +* text=auto diff --git a/__init__.py b/__init__.py new file mode 100644 index 0000000..9b34211 --- /dev/null +++ b/__init__.py @@ -0,0 +1,30 @@ +# Importing flask module in the project is mandatory +# An object of Flask class is our WSGI application. +from flask import Flask, request + +# Flask constructor takes the name of +# current module (__name__) as argument. +app = Flask(__name__) + +# The route() function of the Flask class is a decorator, +# which tells the application which URL should call +# the associated function. +@app.route('/') +# ‘/’ URL is bound with hello_world() function. +def hello_world(): + return 'Hello World' + + +@app.route('/resume/score', methods=['GET']) +def get_resume_score(): + print(request.data) + return request.data + +# main driver function +if __name__ == '__main__': + + # run() method of Flask class runs the application + # on the local development server. + app.run() + + diff --git a/__pycache__/__init__.cpython-37.pyc b/__pycache__/__init__.cpython-37.pyc new file mode 100644 index 0000000..aa96d4f Binary files /dev/null and b/__pycache__/__init__.cpython-37.pyc differ diff --git a/example_resume.pdf b/example_resume.pdf new file mode 100644 index 0000000..f117c90 Binary files /dev/null and b/example_resume.pdf differ diff --git a/main.py b/main.py new file mode 100644 index 0000000..6331225 --- /dev/null +++ b/main.py @@ -0,0 +1,35 @@ +import pdfreader +import textdistance +from pdfreader import PDFDocument, SimplePDFViewer + +# Preparing resume parsing +file_name = "example_resume.pdf" +fd = open(file_name, "rb") +doc = SimplePDFViewer(fd) +doc.render() + +# Getting the string content from the file +resume_content_dump = " ".join(doc.canvas.strings) +sucky_resume_content = " ".join(doc.canvas.strings[:5]) +# print(resume_content_dump) + +# Example inputs from the company +previous_roles = ["technical product manager", "product manager"] +previous_skills = ["react", "sql"] +previous_roles.extend(previous_skills) +client_interests = previous_roles +print(client_interests) + +# Test of text distance algo +print(textdistance.levenshtein.normalized_similarity('ass', 'a s s')) + +# Finding total final score for words +list_norm_scores = [textdistance.jaro_winkler(resume_content_dump, word) for word in client_interests] +avg_normalized_score = sum(list_norm_scores) / len(list_norm_scores) + +# sucky resume +sucky_list_norm_scores = [textdistance.jaro_winkler(sucky_resume_content, word) for word in client_interests] +sucky_avg_normalized_score = sum(sucky_list_norm_scores) / len(sucky_list_norm_scores) + +print('stud resume: ', avg_normalized_score * 100) +print('sucky: ', sucky_avg_normalized_score * 100) diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..ca6b65f --- /dev/null +++ b/readme.md @@ -0,0 +1,2 @@ +# resumeeval + diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..e69de29