Initial commit

This commit is contained in:
talksik
2020-12-12 13:28:46 -05:00
commit 8faf90f358
8 changed files with 69 additions and 0 deletions
Vendored
BIN
View File
Binary file not shown.
+2
View File
@@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto
+30
View File
@@ -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()
Binary file not shown.
Binary file not shown.
+35
View File
@@ -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)
+2
View File
@@ -0,0 +1,2 @@
# resumeeval
View File