Skip to content

Commit

Permalink
Final Update
Browse files Browse the repository at this point in the history
  • Loading branch information
deepakpadhi986 committed Oct 4, 2022
1 parent 03c911e commit 17e1cdb
Showing 1 changed file with 3 additions and 42 deletions.
45 changes: 3 additions & 42 deletions pyresparser/resume_parser.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


import os
import multiprocessing as mp
import io
Expand Down Expand Up @@ -27,13 +25,8 @@ def __init__(
'email': None,
'mobile_number': None,
'skills': None,
'college_name': None,
'degree': None,
'designation': None,
'experience': None,
'company_names': None,
'no_of_pages': None,
'total_experience': None,
}
self.__resume = resume
if not isinstance(self.__resume, io.BytesIO):
Expand Down Expand Up @@ -62,9 +55,7 @@ def __get_basic_details(self):
self.__noun_chunks,
self.__skills_file
)
# edu = utils.extract_education(
# [sent.string.strip() for sent in self.__nlp.sents]
# )

entities = utils.extract_entity_sections_grad(self.__text_raw)

# extract name
Expand All @@ -82,45 +73,15 @@ def __get_basic_details(self):
# extract skills
self.__details['skills'] = skills

# extract college name
try:
self.__details['college_name'] = entities['College Name']
except KeyError:
pass
# no of pages
self.__details['no_of_pages'] = utils.get_number_of_pages(self.__resume)

# extract education Degree
try:
self.__details['degree'] = cust_ent['Degree']
except KeyError:
pass

# extract designation
try:
self.__details['designation'] = cust_ent['Designation']
except KeyError:
pass

# extract company names
try:
self.__details['company_names'] = cust_ent['Companies worked at']
except KeyError:
pass

try:
self.__details['experience'] = entities['experience']
try:
exp = round(
utils.get_total_experience(entities['experience']) / 12,
2
)
self.__details['total_experience'] = exp
except KeyError:
self.__details['total_experience'] = 0
except KeyError:
self.__details['total_experience'] = 0
self.__details['no_of_pages'] = utils.get_number_of_pages(
self.__resume
)
return


Expand Down

0 comments on commit 17e1cdb

Please sign in to comment.