File tree 3 files changed +15
-10
lines changed
3 files changed +15
-10
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,8 @@ def parse(self):
45
45
self .experience = details_parser .calculate_experience (self .raw_text )
46
46
self .cleaned_resume = language_parser .clean_resume (self .raw_text )
47
47
self .skills = language_parser .fetch_skills (self .cleaned_resume )
48
- self .job_positions = details_parser .fetch_jobs (self .cleaned_resume )
48
+ self .job_positions , self .category = details_parser .fetch_jobs (self .cleaned_resume )
49
+
49
50
50
51
# TODO: Add more fetch here
51
52
def show (self ):
@@ -56,5 +57,6 @@ def show(self):
56
57
"emails" : self .emails ,
57
58
"urls" : self .URLs ,
58
59
"skills" : self .skills ,
59
- "jobs" : self .job_positions
60
+ "jobs" : self .job_positions ,
61
+ "job category" : self .category
60
62
}
Original file line number Diff line number Diff line change @@ -26,13 +26,8 @@ def parse(name):
26
26
resume .parse ()
27
27
pprint .pprint (resume .show (), width = 1 )
28
28
29
- # @click.group()
30
- # def skill_operations:
31
- # """Operations on skills"""
32
- # pass
33
-
34
- # @skill_operations.command()
35
- # @click.option('--skill',default='',help="Enter skill to remove")
29
+ # @main.command()
30
+ # @click.option('--skill','-s', help="Enter skill to remove")
36
31
# def remove_skill(skill):
37
32
# if skill:
38
33
# with open(dirpath.PKGPATH + '/data/skills/skills','rb') as fp:
Original file line number Diff line number Diff line change @@ -235,4 +235,12 @@ def fetch_jobs(cleaned_resume):
235
235
if regex_result :
236
236
positions .append (regex_result .start ())
237
237
job_positions .append (job )
238
- return [job for (pos ,job ) in sorted (zip (positions ,job_positions ))]
238
+ job_positions = [job for (pos ,job ) in sorted (zip (positions ,job_positions ))]
239
+ hash_jobs = {}
240
+ for job in job_positions :
241
+ if jobs [job ] in hash_jobs .keys ():
242
+ hash_jobs [jobs [job ]] += 1
243
+ else :
244
+ hash_jobs [jobs [job ]] = 1
245
+ hash_jobs ['Other' ] = 0
246
+ return (job_positions ,max (hash_jobs ,key = hash_jobs .get ))
You can’t perform that action at this time.
0 commit comments