Skip to content

Commit

Permalink
config fix, added new skills as suggested on main repo, added linkedi…
Browse files Browse the repository at this point in the history
…n link
  • Loading branch information
deb0rian committed Jun 30, 2022
1 parent 36f1242 commit 928ec45
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 2 deletions.
4 changes: 4 additions & 0 deletions pyresparser/resume_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ def __get_basic_details(self):
self.__noun_chunks,
self.__skills_file
)

linkedin = utils.extract_linkedin(self.__text)
# edu = utils.extract_education(
# [sent.string.strip() for sent in self.__nlp.sents]
# )
Expand Down Expand Up @@ -121,6 +123,8 @@ def __get_basic_details(self):
self.__details['no_of_pages'] = utils.get_number_of_pages(
self.__resume
)

self.__details['linkedin'] = linkedin
return


Expand Down
2 changes: 1 addition & 1 deletion pyresparser/skills.csv

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions pyresparser/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -494,3 +494,15 @@ def extract_experience(resume_text):
if x and 'experience' in x.lower()
]
return x

def extract_linkedin(text):
'''
Helper function to extract linkedin from text
:param text: plain text extracted from resume file
'''
linkedin = re.findall(r'([\s]+linkedin.com[^\s]+)', text)
if linkedin:
try:
return linkedin[0][0]
except IndexError:
return None
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
'requests>=2.22.0',
'six>=1.12.0',
'sortedcontainers>=2.1.0',
'spacy>=2.1.4',
'spacy>=2.1.4,<=2.3.5',
'srsly>=0.0.7',
'thinc>=7.0.4',
'tqdm>=4.32.2',
Expand Down
5 changes: 5 additions & 0 deletions test_name.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,8 @@ def test_local_name():
def test_local_phone_number():
data = get_local_data()
assert '8087996634' == data['mobile_number']

def test_linkedin_url():
data = get_remote_data()
# no valid linkedin url yet
assert None == data[0]['linkedin']

0 comments on commit 928ec45

Please sign in to comment.