66"""
77import pickle
88import logging
9+ import nltk
910from nltk .corpus import stopwords
1011from nltk .stem .snowball import SnowballStemmer
1112import dirpath
@@ -66,3 +67,42 @@ def fetch_skills(cleaned_resume):
6667 if skill .lower () in cleaned_resume :
6768 skill_set .append (skill )
6869 return skill_set
70+
71+
72+ """
73+
74+ Utility function that fetches the current employer from resume
75+ Params: resume_text Type: string
76+ returns: current_employer Type: string
77+
78+ """
79+ def fetch_emplyer (resume_text , job_positions ):
80+ organizations = []
81+ # get all organizations in the resume_text
82+ # if any of this organization is beside a job position, assume it as an emplyer
83+
84+ return current_employer
85+
86+
87+ """
88+
89+ Utility function that fetches the Person Name from resume
90+ Params: resume_text Type: string
91+ returns: name Type: string
92+
93+ Returns the first Person entity found by tokenizing each sentence
94+ If no such entities are found, returns "Applicant name couldn't be processed"
95+
96+ """
97+ def fetch_name (resume_text ):
98+ tokenized_sentences = nltk .sent_tokenize (resume_text )
99+
100+ for sentence in tokenized_sentences :
101+ for chunk in nltk .ne_chunk (nltk .pos_tag (nltk .word_tokenize (sentence ), tagset = 'universal' )):
102+ if hasattr (chunk ,'label' ):# and chunk.label() == 'PERSON':
103+ chunk = chunk [0 ]
104+ (name ,tag ) = chunk
105+ if tag == 'NOUN' :
106+ return name
107+
108+ return "Applicant name couldn't be processed"
0 commit comments