mehdirabiee commited on
Commit
c1ae082
1 Parent(s): c693b05
app.py CHANGED
@@ -1,26 +1,27 @@
 
1
  import os
 
2
 
3
  import gradio as gr
4
  from gradio_pdf import PDF
5
  from dotenv import load_dotenv
6
  load_dotenv()
7
 
8
- from resume_parser import ResumeParser, pdf_to_string
9
  from resume_template import Resume
10
  from pathlib import Path
11
 
12
-
13
- def parse_resume(resume_file, use_openai=False, openai_key=""):
14
  p = ResumeParser(use_openai, openai_key)
15
- resume_text = pdf_to_string(resume_file)
16
  resume = p.extract_resume_fields(resume_text)
17
  if isinstance(resume, Resume):
18
  resume = resume.json()
19
  return resume
20
 
21
- def match_resume_job(resume_file, job_text, use_openai=False, openai_key=""):
22
  p = ResumeParser(use_openai, openai_key)
23
- resume_text = pdf_to_string(resume_file)
24
  res = p.match_resume_with_job_description(resume_text, job_text)
25
  return res
26
 
@@ -36,7 +37,8 @@ with gr.Blocks() as demo:
36
  with gr.Tab(label="Parser"):
37
  with gr.Row():
38
  with gr.Column():
39
- pdf_file_txt = PDF(label="Resume File (pdf)", interactive=True)
 
40
  use_openai_chk = change_openai_checkbox("")
41
  openai_key_txt = gr.Text(label="OpenAI Token", placeholder="openAI token or env[OPENAI_API_KEY]")
42
  parse_btn = gr.Button("Parse Resume")
 
1
+ import io
2
  import os
3
+ from typing import Union
4
 
5
  import gradio as gr
6
  from gradio_pdf import PDF
7
  from dotenv import load_dotenv
8
  load_dotenv()
9
 
10
+ from resume_parser import ResumeParser, StructuredResumeParser, pdf_to_string
11
  from resume_template import Resume
12
  from pathlib import Path
13
 
14
+ def parse_resume(resume_data:Union[bytes, str], use_openai=False, openai_key=""):
 
15
  p = ResumeParser(use_openai, openai_key)
16
+ resume_text = pdf_to_string(resume_data)
17
  resume = p.extract_resume_fields(resume_text)
18
  if isinstance(resume, Resume):
19
  resume = resume.json()
20
  return resume
21
 
22
+ def match_resume_job(resume_data:Union[bytes, str], job_text, use_openai=False, openai_key=""):
23
  p = ResumeParser(use_openai, openai_key)
24
+ resume_text = pdf_to_string(resume_data)
25
  res = p.match_resume_with_job_description(resume_text, job_text)
26
  return res
27
 
 
37
  with gr.Tab(label="Parser"):
38
  with gr.Row():
39
  with gr.Column():
40
+ #pdf_file_txt = PDF(label="Resume File (pdf)", interactive=True)
41
+ pdf_file_txt = gr.File(label="Resume File (pdf)", type='binary', interactive=True)
42
  use_openai_chk = change_openai_checkbox("")
43
  openai_key_txt = gr.Text(label="OpenAI Token", placeholder="openAI token or env[OPENAI_API_KEY]")
44
  parse_btn = gr.Button("Parse Resume")
prompts/full_job.prompt ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ You are a hiring expert with three key responsibilities: ResumeParser, JobMatcher, and ResumeBuilder.
2
+
3
+ ResumeParser Task:
4
+ Given a provided resume, extract and organize information into a structured JSON format. Ensure accurate representation with the correct data types according to defined classes. Utilize the response template for formatting. Omit fields if not applicable or information is unavailable.
5
+
6
+ Response Template:
7
+ {
8
+ "personal_details": {
9
+ "full_name": "str",
10
+ "contact_info": {
11
+ "email": "Optional[str]",
12
+ "phone": "Optional[str]",
13
+ "linkedin": "Optional[str]"
14
+ },
15
+ "professional_summary": "Optional[str]"
16
+ },
17
+ "education": [
18
+ {
19
+ "institution": "Optional[str]",
20
+ "degree": "Optional[str]",
21
+ "field_of_study": "Optional[str]",
22
+ "graduation_date": "Optional[str]"
23
+ }
24
+ ],
25
+ "work_experience": [
26
+ {
27
+ "company": "Optional[str]",
28
+ "title": "Optional[str]",
29
+ "duration": "Optional[str]",
30
+ "description": "Optional[str]",
31
+ "notable_contributions": "Optional[List[str]]"
32
+ }
33
+ ],
34
+ "projects": [
35
+ {
36
+ "name": "Optional[str]",
37
+ "description": "Optional[str]",
38
+ "technologies": "Optional[str]",
39
+ "role": "Optional[str]"
40
+ }
41
+ ],
42
+ "skills": "List[str]",
43
+ "certifications": [
44
+ {
45
+ "title": "Optional[str]",
46
+ "certifying_body": "Optional[str]",
47
+ "date": "Optional[str]"
48
+ }
49
+ ],
50
+ "publications": [
51
+ {
52
+ "title": "Optional[str]",
53
+ "co_authors": "List[str]",
54
+ "date": "Optional[str]"
55
+ }
56
+ ],
57
+ "awards": [
58
+ {
59
+ "title": "Optional[str]",
60
+ "awarding_body": "Optional[str]",
61
+ "date": "Optional[str]"
62
+ }
63
+ ],
64
+ "additional_sections": {
65
+ "volunteer_experience": [
66
+ {
67
+ "organization": "Optional[str]",
68
+ "role": "Optional[str]",
69
+ "duration": "Optional[str]",
70
+ "description": "Optional[str]"
71
+ }
72
+ ],
73
+ "languages": "Optional[List[str]]",
74
+ "interests": "Optional[List[str]]"
75
+ }
76
+ }
77
+ JobMatcher Task:
78
+ Analyze the provided job description to identify key skills and experiences. Create a new profile section in the resume, emphasizing the most relevant skills and experiences matching the job requirements. Keep the profile concise (4-5 sentences), using strong action verbs and quantifiable achievements.
79
+
80
+ ResumeBuilder Task:
81
+ Given the previously parsed resume information and the newly created profile section, create a new HTML resume. Ensure all information is included, and output a complete HTML file ready for export to PDF. Avoid adding any extra information to the output. Return only the created HTML.
prompts/job_description_matching.prompt CHANGED
@@ -1,15 +1,12 @@
1
- Analyze the provided job description and identify the key skills and experiences required for the position.
2
- Using the identified skills and your understanding of the provided resume, create a new profile section for the resume highlighting the most relevant skills and experiences that directly match the requirements outlined in the job description.
3
- Ensure the profile section is concise and impactful, using strong action verbs and quantifiable achievements where possible.
4
- Aim to keep the profile section within 4-5 sentences.
5
- ----
6
 
7
- Job Description:
8
- {job_description}
 
 
9
 
10
- ----
11
 
12
- resume:
13
- {resume}
14
 
15
- ----
 
1
+ Your task:
 
 
 
 
2
 
3
+ Identify key skills and experiences required by the job description.
4
+ Extract relevant skills and achievements from the resume to compile a professional summary.
5
+ Ensure the summary is brief, emphasizing pertinent skills and quantifiable accomplishments with action-oriented language.
6
+ Limit the summary to 4-5 persuasive sentences and avoid mentioning job titles or non-relevant details.
7
 
8
+ Job Description: {job_description}
9
 
10
+ Resume Information: {resume}
 
11
 
12
+ Provide only the professional summary, without any additional elucidation.
prompts/json.schema CHANGED
@@ -1,70 +1,124 @@
1
  {
2
  "personal_details": {
3
- "full_name": "str",
4
- "contact_info": {
5
- "email": "Optional[str]",
6
- "phone": "Optional[str]",
7
- "linkedin": "Optional[str]"
 
 
 
 
8
  },
9
- "professional_summary": "Optional[str]"
10
  },
11
- "education": [
12
- {
13
- "institution": "Optional[str]",
14
- "degree": "Optional[str]",
15
- "field_of_study": "Optional[str]",
16
- "graduation_date": "Optional[str]"
 
 
 
 
 
 
 
 
17
  }
18
- ],
19
- "work_experience": [
20
- {
21
- "company": "Optional[str]",
22
- "title": "Optional[str]",
23
- "duration": "Optional[str]",
24
- "description": "Optional[str]",
25
- "notable_contributions": "Optional[List[str]]"
 
 
 
 
 
 
26
  }
27
- ],
28
- "projects": [
29
- {
30
- "name": "Optional[str]",
31
- "description": "Optional[str]",
32
- "technologies": "Optional[str]",
33
- "role": "Optional[str]"
 
 
 
 
 
34
  }
35
- ],
36
- "skills": "List[str]",
37
- "certifications": [
38
- {
39
- "title": "Optional[str]",
40
- "certifying_body": "Optional[str]",
41
- "date": "Optional[str]"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
42
  }
43
- ],
44
- "publications": [
45
- {
46
- "title": "Optional[str]",
47
- "co_authors": "List[str]",
48
- "date": "Optional[str]"
 
 
 
 
 
49
  }
50
- ],
51
- "awards": [
52
- {
53
- "title": "Optional[str]",
54
- "awarding_body": "Optional[str]",
55
- "date": "Optional[str]"
 
 
 
 
 
 
 
56
  }
57
- ],
58
- "additional_sections": {
59
- "volunteer_experience": [
60
- {
61
- "organization": "Optional[str]",
62
- "role": "Optional[str]",
63
- "duration": "Optional[str]",
64
- "description": "Optional[str]"
65
- }
66
- ],
67
- "languages": "Optional[List[str]]",
68
- "interests": "Optional[List[str]]"
 
 
 
69
  }
70
- }
 
1
  {
2
  "personal_details": {
3
+ "type": "object",
4
+ "properties": {
5
+ "first_name": { "type": "string", "default": "" },
6
+ "last_name": { "type": "string", "default": "" },
7
+ "phone_number": { "type": "string", "default": "" },
8
+ "linkedin_url": { "type": "string", "default": "" },
9
+ "email_address": { "type": "string", "default": "" },
10
+ "nationality": { "type": "string", "default": "" },
11
+ "professional_summary": { "type": "string", "default": "" }
12
  },
13
+ "required": ["first_name", "last_name"]
14
  },
15
+ "education": {
16
+ "type": "array",
17
+ "items": {
18
+ "type": "object",
19
+ "properties": {
20
+ "degree": { "type": "string", "default": "" },
21
+ "institution": { "type": "string", "default": "" },
22
+ "field_of_study": { "type": "string", "default": "" },
23
+ "country": { "type": "string", "default": "" },
24
+ "grade": { "type": "string", "default": "" },
25
+ "start_date": { "type": "string", "default": "" },
26
+ "end_date": { "type": "string", "default": "" }
27
+ },
28
+ "required": ["degree", "institution", "field_of_study"]
29
  }
30
+ },
31
+ "work_experience": {
32
+ "type": "array",
33
+ "items": {
34
+ "type": "object",
35
+ "properties": {
36
+ "company": { "type": "string", "default": "" },
37
+ "job_title": { "type": "string", "default": "" },
38
+ "description": { "type": "string", "default": "" },
39
+ "start_date": { "type": "string", "default": "" },
40
+ "end_date": { "type": "string", "default": "" },
41
+ "notable_contributions": { "type": "array", "items": { "type": "string" }, "default": [] }
42
+ },
43
+ "required": ["company", "job_title"]
44
  }
45
+ },
46
+ "projects": {
47
+ "type": "array",
48
+ "items": {
49
+ "type": "object",
50
+ "properties": {
51
+ "name": { "type": "string", "default": "" },
52
+ "description": { "type": "string", "default": "" },
53
+ "technologies": { "type": "string", "default": "" },
54
+ "role": { "type": "string", "default": "" }
55
+ },
56
+ "required": ["name"]
57
  }
58
+ },
59
+ "certifications": {
60
+ "type": "array",
61
+ "items": {
62
+ "type": "object",
63
+ "properties": {
64
+ "title": { "type": "string", "default": "" },
65
+ "certifying_body": { "type": "string", "default": "" },
66
+ "date": { "type": "string", "default": "" }
67
+ },
68
+ "required": ["title"]
69
+ }
70
+ },
71
+ "publications": {
72
+ "type": "array",
73
+ "items": {
74
+ "type": "object",
75
+ "properties": {
76
+ "title": { "type": "string", "default": "" },
77
+ "co_authors": { "type": "array", "items": { "type": "string" }, "default": [] },
78
+ "date": { "type": "string", "default": "" }
79
+ },
80
+ "required": ["title"]
81
  }
82
+ },
83
+ "awards": {
84
+ "type": "array",
85
+ "items": {
86
+ "type": "object",
87
+ "properties": {
88
+ "title": { "type": "string", "default": "" },
89
+ "awarding_body": { "type": "string", "default": "" },
90
+ "date": { "type": "string", "default": "" }
91
+ },
92
+ "required": ["title"]
93
  }
94
+ },
95
+ "volunteer_experience": {
96
+ "type": "array",
97
+ "items": {
98
+ "type": "object",
99
+ "properties": {
100
+ "organization": { "type": "string", "default": "" },
101
+ "description": { "type": "string", "default": "" },
102
+ "role": { "type": "string", "default": "" },
103
+ "start_date": { "type": "string", "default": "" },
104
+ "end_date": { "type": "string", "default": "" }
105
+ },
106
+ "required": ["organization"]
107
  }
108
+ },
109
+ "languages": {
110
+ "type": "array",
111
+ "items": { "type": "string" },
112
+ "default": []
113
+ },
114
+ "interests": {
115
+ "type": "array",
116
+ "items": { "type": "string" },
117
+ "default": []
118
+ },
119
+ "skills": {
120
+ "type": "array",
121
+ "items": { "type": "string" },
122
+ "default": []
123
  }
124
+ }
prompts/json0.schema ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "personal_details": {
3
+ "first_name": "str",
4
+ "last_name": "str",
5
+ "phone_number": "Optional[str]",
6
+ "linkedin_url": "Optional[str]",
7
+ "email_address": "Optional[str]",
8
+ "nationality": "Optional[str]",
9
+ "professional_summary": "Optional[str]"
10
+ },
11
+ "education": [
12
+ {
13
+ "degree": "str",
14
+ "institution": "str",
15
+ "field_of_study": "str",
16
+ "country": "Optional[str]",
17
+ "grade": "Optional[str]",
18
+ "start_date": "Optional[str]",
19
+ "end_date": "Optional[str]"
20
+ }
21
+ ],
22
+ "work_experience": [
23
+ {
24
+ "company": "str",
25
+ "job_title": "str",
26
+ "description": "Optional[str]",
27
+ "start_date": "Optional[str]",
28
+ "end_date": "Optional[str]",
29
+ "notable_contributions": "List[str]"
30
+ }
31
+ ],
32
+ "projects": [
33
+ {
34
+ "name": "str",
35
+ "description": "Optional[str]",
36
+ "technologies": "Optional[str]",
37
+ "role": "Optional[str]"
38
+ }
39
+ ],
40
+ "skills": "List[str]",
41
+ "certifications": [
42
+ {
43
+ "title": "str",
44
+ "certifying_body": "Optional[str]",
45
+ "date": "Optional[str]"
46
+ }
47
+ ],
48
+ "publications": [
49
+ {
50
+ "title": "str",
51
+ "co_authors": "List[str]",
52
+ "date": "Optional[str]"
53
+ }
54
+ ],
55
+ "awards": [
56
+ {
57
+ "title": "str",
58
+ "awarding_body": "Optional[str]",
59
+ "date": "Optional[str]"
60
+ }
61
+ ],
62
+ "volunteer_experience": [
63
+ {
64
+ "organization": "str",
65
+ "role": "Optional[str]",
66
+ "description": "Optional[str]",
67
+ "start_date": "Optional[str]",
68
+ "end_date": "Optional[str]"
69
+ }
70
+ ],
71
+ "languages": "List[str]",
72
+ "interests": "List[str]"
73
+ }
prompts/json2.schema ADDED
@@ -0,0 +1,183 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "Resume",
4
+ "type": "object",
5
+ "properties": {
6
+ "personal_details": {
7
+ "$ref": "#/definitions/PersonalDetails"
8
+ },
9
+ "education": {
10
+ "type": "array",
11
+ "items": {
12
+ "$ref": "#/definitions/Education"
13
+ },
14
+ "default": []
15
+ },
16
+ "work_experience": {
17
+ "type": "array",
18
+ "items": {
19
+ "$ref": "#/definitions/WorkExperience"
20
+ },
21
+ "default": []
22
+ },
23
+ "projects": {
24
+ "type": "array",
25
+ "items": {
26
+ "$ref": "#/definitions/Project"
27
+ },
28
+ "default": []
29
+ },
30
+ "skills": {
31
+ "type": "array",
32
+ "items": {
33
+ "type": "string"
34
+ },
35
+ "default": []
36
+ },
37
+ "certifications": {
38
+ "type": "array",
39
+ "items": {
40
+ "$ref": "#/definitions/Certification"
41
+ },
42
+ "default": []
43
+ },
44
+ "publications": {
45
+ "type": "array",
46
+ "items": {
47
+ "$ref": "#/definitions/Publication"
48
+ },
49
+ "default": []
50
+ },
51
+ "awards": {
52
+ "type": "array",
53
+ "items": {
54
+ "$ref": "#/definitions/Award"
55
+ },
56
+ "default": []
57
+ },
58
+ "volunteer_experience": {
59
+ "type": "array",
60
+ "items": {
61
+ "$ref": "#/definitions/VolunteerExperience"
62
+ },
63
+ "default": []
64
+ },
65
+ "languages": {
66
+ "type": "array",
67
+ "items": {
68
+ "type": "string"
69
+ },
70
+ "default": []
71
+ },
72
+ "interests": {
73
+ "type": "array",
74
+ "items": {
75
+ "type": "string"
76
+ },
77
+ "default": []
78
+ }
79
+ },
80
+ "required": ["personal_details"],
81
+ "definitions": {
82
+ "PersonalDetails": {
83
+ "type": "object",
84
+ "properties": {
85
+ "first_name": {"type": "string", "description": "The first name of the person.", "default": ""},
86
+ "last_name": {"type": "string", "description": "The last name of the person.", "default": ""},
87
+ "phone_number": {"type": "string", "description": "The phone number of the person.", "default": ""},
88
+ "linkedin_url": {"type": "string", "description": "The url of the linkedin profile of the person.", "default": ""},
89
+ "email_address": {"type": "string", "description": "The email address of the person.", "default": ""},
90
+ "nationality": {"type": "string", "description": "The nationality of the person.", "default": ""},
91
+ "professional_summary": {"type": "string", "description": "The professional summary or the profile section of resume of the person", "default": ""}
92
+ },
93
+ "required": ["first_name", "last_name"]
94
+ },
95
+ "Education": {
96
+ "type": "object",
97
+ "properties": {
98
+ "degree": {"type": "string", "description": "The degree obtained or expected.", "default": ""},
99
+ "institution": {"type": "string", "description": "The university, college, or educational institution visited.", "default": ""},
100
+ "field_of_study": {"type": "string", "description": "The field of study.", "default": ""},
101
+ "country": {"type": "string", "description": "The country of the institution.", "default": ""},
102
+ "grade": {"type": "string", "description": "The grade achieved or expected.", "default": ""},
103
+ "start_date": {"type": "string", "description": "When the study started.", "default": ""},
104
+ "end_date": {"type": "string", "description": "When the study ended.", "default": ""}
105
+ },
106
+ "required": ["degree", "institution", "field_of_study"]
107
+ },
108
+ "WorkExperience": {
109
+ "type": "object",
110
+ "properties": {
111
+ "company": {"type": "string", "description": "The company name of the work experience.", "default": ""},
112
+ "job_title": {"type": "string", "description": "The job title.", "default": ""},
113
+ "description": {"type": "string", "description": "The job or role description.", "default": ""},
114
+ "start_date": {"type": "string", "description": "When the job started.", "default": ""},
115
+ "end_date": {"type": "string", "description": "When the job ended.", "default": ""},
116
+ "notable_contributions": {
117
+ "type": "array",
118
+ "items": {
119
+ "type": "string"
120
+ },
121
+ "description": "Notable contributions in the work experience.",
122
+ "default": []
123
+ }
124
+ },
125
+ "required": ["company", "job_title"]
126
+ },
127
+ "Project": {
128
+ "type": "object",
129
+ "properties": {
130
+ "name": {"type": "string", "description": "The name of the project", "default": ""},
131
+ "description": {"type": "string", "description": "The description of the project", "default": ""},
132
+ "technologies": {"type": "string", "description": "The technologies used in the project", "default": ""},
133
+ "role": {"type": "string", "description": "The role of the person in the project", "default": ""}
134
+ },
135
+ "required": ["name"]
136
+ },
137
+ "Certification": {
138
+ "type": "object",
139
+ "properties": {
140
+ "title": {"type": "string", "description": "Title of the certificate", "default": ""},
141
+ "certifying_body": {"type": "string", "description": "The text or body of the certificate", "default": ""},
142
+ "date": {"type": "string", "description": "The Date of the certificate", "default": ""}
143
+ },
144
+ "required": ["title"]
145
+ },
146
+ "Publication": {
147
+ "type": "object",
148
+ "properties": {
149
+ "title": {"type": "string", "description": "The title of the publication", "default": ""},
150
+ "co_authors": {
151
+ "type": "array",
152
+ "items": {
153
+ "type": "string"
154
+ },
155
+ "description": "The list of other authors of the publication",
156
+ "default": []
157
+ },
158
+ "date": {"type": "string", "description": "The date of publication", "default": ""}
159
+ },
160
+ "required": ["title", "co_authors"]
161
+ },
162
+ "Award": {
163
+ "type": "object",
164
+ "properties": {
165
+ "title": {"type": "string", "description": "Award Title", "default": ""},
166
+ "awarding_body": {"type": "string", "description": "The text or body of award", "default": ""},
167
+ "date": {"type": "string", "description": "The date of award", "default": ""}
168
+ },
169
+ "required": ["title"]
170
+ },
171
+ "VolunteerExperience": {
172
+ "type": "object",
173
+ "properties": {
174
+ "organization": {"type": "string", "description": "The organization name of volunteer experience", "default": ""},
175
+ "description": {"type": "string", "description": "The description of volunteer experience", "default": ""},
176
+ "role": {"type": "string", "description": "Role of the person in the volunteer experience", "default": ""},
177
+ "start_date": {"type": "string", "description": "The start date of the volunteer experience", "default": ""},
178
+ "end_date": {"type": "string", "description": "The end date of the volunteer experience", "default": ""}
179
+ },
180
+ "required": ["organization"]
181
+ }
182
+ }
183
+ }
prompts/resume_extraction.prompt CHANGED
@@ -1,20 +1,12 @@
1
- Given the provided resume, extract and organize the following information into a structured JSON format.
2
- Ensure that each field is accurately represented with the correct data types according to the defined classes.
3
- If a section is not applicable or the information is unavailable, omit that particular field from the JSON object.
4
-
5
- Utilize the provided response template for formatting.
6
- ----
7
-
8
- Response Template:
9
- {response_template}
10
-
11
- ----
12
-
13
- resume:
14
- {resume}
15
-
16
- ----
17
 
 
 
 
 
18
 
 
19
 
 
20
 
 
 
1
+ Your task is to transform the provided resume data into a JSON string, adhering to these rules:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
 
3
+ Ensure compliance with the given JSON schema.
4
+ Correctly match data types as per the schema.
5
+ Use default values for unspecified or inapplicable fields according to the schema.
6
+ Omit any fields that would have a value of None.
7
 
8
+ JSON Schema: {json_schema}
9
 
10
+ Resume Information: {resume}
11
 
12
+ Output only the resulting JSON string, with no additional commentary.
prompts/resume_extraction_structured.prompt ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ Your task is to parse the provided resume data and transfrom it into a structured data
2
+
3
+ Resume data: {resume}
4
+
requirements.txt CHANGED
@@ -7,4 +7,6 @@ huggingface_hub
7
  langchain
8
  langchain-community
9
  langchain-openai
10
- python-dotenv
 
 
 
7
  langchain
8
  langchain-community
9
  langchain-openai
10
+ python-dotenv
11
+ fastapi[all]
12
+
resume_api.py ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from typing import Annotated, Optional
2
+
3
+ import pydantic
4
+ import uvicorn
5
+ from fastapi import FastAPI, UploadFile, Body, File
6
+
7
+ from resume_parser import ResumeParser, pdf_to_string
8
+ from resume_template import Resume
9
+
10
+ app = FastAPI()
11
+
12
+ @app.get("/")
13
+ async def root():
14
+ return "OK"
15
+
16
+ @app.post("/parse_resume/")
17
+ async def parse_resume(resume_file: UploadFile, use_openai:bool=True):
18
+ content = await resume_file.read()
19
+ await resume_file.close()
20
+ p = ResumeParser(use_openai)
21
+ resume_text = pdf_to_string(content)
22
+ resume = p.extract_resume_fields(resume_text)
23
+ return resume
24
+
25
+ @app.post("/match_resume_job/")
26
+ async def match_resume_job(resume_file: UploadFile, job_description:Annotated[str, Body(embed=True)], use_openai:bool=True):
27
+ content = await resume_file.read()
28
+ await resume_file.close()
29
+ p = ResumeParser(use_openai)
30
+ resume_text = pdf_to_string(content)
31
+ res = p.match_resume_with_job_description(resume_text, job_description)
32
+ return res
33
+
34
+ @app.post("/match_resume_job_file/")
35
+ async def match_resume_job(resume_file: UploadFile, job_description_file:UploadFile, use_openai:bool=True):
36
+ content = await resume_file.read()
37
+ await resume_file.close()
38
+ p = ResumeParser(use_openai)
39
+ resume_text = pdf_to_string(content)
40
+ job_description_text = await job_description_file.read()
41
+ await job_description_file.close()
42
+ res = p.match_resume_with_job_description(resume_text, job_description_text)
43
+ return res
44
+
45
+ if __name__ == '__main__':
46
+ uvicorn.run(app, host="0.0.0.0", port=8000)
resume_builder.py ADDED
@@ -0,0 +1,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import io
2
+ from typing import List
3
+ from reportlab.lib.pagesizes import letter
4
+ from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer, ListFlowable, ListItem
5
+ from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
6
+ from reportlab.lib.enums import TA_LEFT, TA_CENTER
7
+
8
+ from reportlab.lib.units import inch
9
+
10
+ from resume_template import Resume
11
+ # The Class definitions (PersonalDetails, Education, etc.) should be imported or defined above this line.
12
+ # Now assuming those classes are defined and imported if they're in another module.
13
+
14
+ class ResumeGenerator:
15
+ def __init__(self, resume: Resume):
16
+ self.resume: Resume = resume
17
+ self.buffer = io.BytesIO()
18
+ self.styles = getSampleStyleSheet()
19
+ self.custom_styles()
20
+
21
+ def custom_styles(self):
22
+ self.styles.add(ParagraphStyle(name='CustomTitle', parent=self.styles['Title'], fontSize=18, leading=22,
23
+ alignment=TA_CENTER))
24
+ #self.styles.add(ParagraphStyle(name='Heading1', parent=self.styles['Heading1'], spaceAfter=10, fontSize=14))
25
+ self.styles.add(ParagraphStyle(name='NormalIndent', parent=self.styles['Normal'], leftIndent=15))
26
+
27
+ def generate_pdf(self, filename):
28
+ doc = SimpleDocTemplate(self.buffer, pagesize=letter)
29
+ flowables = []
30
+
31
+ self.add_personal_details(flowables)
32
+ self.add_section_title(flowables, "Education")
33
+ self.add_education(flowables)
34
+ self.add_section_title(flowables, "Work Experience")
35
+ self.add_work_experience(flowables)
36
+ self.add_section_title(flowables, "Projects")
37
+ self.add_projects(flowables)
38
+ # Additional sections following the same pattern...
39
+
40
+ doc.build(flowables)
41
+ pdf = self.buffer.getvalue()
42
+ self.buffer.close()
43
+
44
+ with open(filename, 'wb') as f:
45
+ f.write(pdf)
46
+
47
+ def add_personal_details(self, flowables):
48
+ pd = self.resume.personal_details
49
+ flowables.append(Paragraph(f"{pd.first_name} {pd.last_name}", self.styles['CustomTitle']))
50
+ # Include additional personal details as needed...
51
+ flowables.append(Spacer(1, 0.2 * inch))
52
+
53
+ def add_education(self, flowables):
54
+ for edu in self.resume.education:
55
+ flowables.append(Paragraph(
56
+ f"{edu.degree} in {edu.field_of_study}, {edu.institution} ({edu.start_date} - {edu.end_date})",
57
+ self.styles['NormalIndent']))
58
+ flowables.append(Spacer(1, 0.1 * inch))
59
+
60
+ def add_work_experience(self, flowables):
61
+ for work in self.resume.work_experience:
62
+ flowables.append(Paragraph(f"{work.job_title}, {work.company} ({work.start_date} - {work.end_date})",
63
+ self.styles['NormalIndent']))
64
+ flowables.append(Spacer(1, 0.05 * inch))
65
+ contributions = ListFlowable([ListItem(Paragraph(contribution, self.styles['Bullet'])) for contribution in
66
+ (work.notable_contributions or [])], bulletType='bullet', leftIndent=35)
67
+ if work.notable_contributions:
68
+ flowables.append(contributions)
69
+ flowables.append(Spacer(1, 0.1 * inch))
70
+
71
+ # Methods for Projects, Skills, Certifications, etc...
72
+
73
+ def add_projects(self, flowables):
74
+ for project in self.resume.projects:
75
+ flowables.append(Paragraph(f"{project.name}: {project.description}", self.styles['NormalIndent']))
76
+ flowables.append(Spacer(1, 0.1 * inch))
77
+
78
+ def add_section_title(self, flowables, title):
79
+ flowables.append(Spacer(1, 0.2 * inch))
80
+ flowables.append(Paragraph(title, self.styles['Heading1']))
81
+ flowables.append(Spacer(1, 0.1 * inch))
82
+
83
+ # Assuming you have a populated resume_obj of type Resume...
84
+ # resume_generator = ResumeGenerator(resume_obj)
85
+ # resume_generator.generate_pdf('My_Resume.pdf')
resume_parser.py CHANGED
@@ -1,57 +1,83 @@
 
1
  import os
2
  from json import JSONDecodeError
 
3
 
4
  import PyPDF2
5
  from dotenv import load_dotenv
6
  from langchain.output_parsers import PydanticOutputParser
7
  from langchain.prompts import PromptTemplate
8
  from langchain_community.callbacks import get_openai_callback
 
9
  from langchain_openai import ChatOpenAI
10
  from langchain_community.llms import HuggingFaceEndpoint
11
  from langchain_core.messages import BaseMessage
12
  from pydantic import ValidationError
13
 
 
14
  from resume_template import Resume
15
 
16
  load_dotenv()
17
 
18
 
19
- def pdf_to_string(file):
20
  """
21
  Convert a PDF file to a string.
22
 
23
  Parameters:
24
- file (io.BytesIO): A file-like object representing the PDF file. or file Path
25
 
26
  Returns:
27
  str: The extracted text from the PDF.
28
  """
29
- pdf_reader = PyPDF2.PdfReader(file)
 
30
  num_pages = len(pdf_reader.pages)
31
  text = ''
32
  for i in range(num_pages):
33
  page = pdf_reader.pages[i]
34
  text += page.extract_text()
 
 
35
  return text
36
 
 
37
  class ResumeParser:
 
 
 
 
 
 
 
 
38
  def __init__(self, use_openai=False, openai_key=""):
39
  self.use_openai = use_openai
40
- self.openai_key = openai_key
41
  self.model = None
42
- self.set_key()
 
 
43
  self.set_model()
44
 
45
- def set_key(self):
 
46
  if len(self.openai_key) == 0 and "OPENAI_API_KEY" in os.environ:
47
  self.openai_key = os.environ["OPENAI_API_KEY"]
48
 
49
- def set_model(self):
50
  if self.use_openai:
51
- self.model = ChatOpenAI(temperature=0, model="gpt-3.5-turbo", max_tokens=2500, openai_api_key=self.openai_key)
 
52
  else:
53
- self.model = HuggingFaceEndpoint(repo_id="mistralai/Mixtral-8x7B-Instruct-v0.1", temperature=0.001,
54
- max_new_tokens=4000)
 
 
 
 
 
 
55
 
56
  def extract_resume_fields(self, full_text):
57
  """
@@ -77,7 +103,7 @@ class ResumeParser:
77
  prompt_template = PromptTemplate(
78
  template=template,
79
  input_variables=["resume"],
80
- partial_variables={"response_template": json_schema},
81
  )
82
  # Invoke the language model and process the resume
83
  formatted_input = prompt_template.format_prompt(resume=full_text)
@@ -87,7 +113,7 @@ class ResumeParser:
87
  output = llm.invoke(formatted_input.to_string())
88
  print(cb)
89
 
90
- # print(output) # Print the output object for debugging
91
  if isinstance(output, BaseMessage):
92
  output = output.content
93
  try:
@@ -112,11 +138,6 @@ class ResumeParser:
112
  return output
113
 
114
 
115
- def run(self, pdf_file_path):
116
- text = pdf_to_string(pdf_file_path)
117
- extracted_fields = self.extract_resume_fields(text)
118
- return extracted_fields
119
-
120
  def match_resume_with_job_description(self, resume_txt, job_description):
121
  with open("prompts/job_description_matching.prompt", "r") as f:
122
  template = f.read()
@@ -138,10 +159,120 @@ class ResumeParser:
138
  output = output.content
139
  return output
140
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
141
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
142
 
143
 
144
  if __name__ == "__main__":
145
- p = ResumeParser(use_openai=False)
146
- res = p.run("samples/0.pdf")
147
- print(res)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import io
2
  import os
3
  from json import JSONDecodeError
4
+ from typing import Union
5
 
6
  import PyPDF2
7
  from dotenv import load_dotenv
8
  from langchain.output_parsers import PydanticOutputParser
9
  from langchain.prompts import PromptTemplate
10
  from langchain_community.callbacks import get_openai_callback
11
+ from langchain_community.llms.huggingface_pipeline import HuggingFacePipeline
12
  from langchain_openai import ChatOpenAI
13
  from langchain_community.llms import HuggingFaceEndpoint
14
  from langchain_core.messages import BaseMessage
15
  from pydantic import ValidationError
16
 
17
+ from resume_builder import ResumeGenerator
18
  from resume_template import Resume
19
 
20
  load_dotenv()
21
 
22
 
23
+ def pdf_to_string(file:Union[io.BytesIO, str, bytes]):
24
  """
25
  Convert a PDF file to a string.
26
 
27
  Parameters:
28
+ file: A file-like object representing the PDF file (io.BytesIO, or file Path, or bytes)
29
 
30
  Returns:
31
  str: The extracted text from the PDF.
32
  """
33
+ f = io.BytesIO(file) if isinstance(file, bytes) else file
34
+ pdf_reader = PyPDF2.PdfReader(f)
35
  num_pages = len(pdf_reader.pages)
36
  text = ''
37
  for i in range(num_pages):
38
  page = pdf_reader.pages[i]
39
  text += page.extract_text()
40
+ if isinstance(f, io.BytesIO):
41
+ f.close()
42
  return text
43
 
44
+
45
  class ResumeParser:
46
+ list_llm = [
47
+ "mistralai/mistral-7b-instruct-v0.2",
48
+ "mistralai/Mixtral-8x7B-Instruct-v0.1",
49
+ "microsoft/phi-2",
50
+ "google/gemma-7b-it",
51
+ "HuggingFaceH4/zephyr-7b-beta",
52
+ "HuggingFaceH4/zephyr-7b-gemma-v0.1",
53
+ ]
54
  def __init__(self, use_openai=False, openai_key=""):
55
  self.use_openai = use_openai
56
+ self.openai_key = ""
57
  self.model = None
58
+ self.hf_model_name = self.list_llm[0]
59
+ self.openai_model_name = "gpt-3.5-turbo" #"gpt-4-1106-preview"
60
+ self.set_key(openai_key)
61
  self.set_model()
62
 
63
+ def set_key(self, openai_key=""):
64
+ self.openai_key = openai_key
65
  if len(self.openai_key) == 0 and "OPENAI_API_KEY" in os.environ:
66
  self.openai_key = os.environ["OPENAI_API_KEY"]
67
 
68
+ def set_model(self, hf_model_name=""):
69
  if self.use_openai:
70
+ print(f"using OpenAI Model {self.openai_model_name}")
71
+ self.model = ChatOpenAI(temperature=0, model=self.openai_model_name, max_tokens=2500, openai_api_key=self.openai_key)
72
  else:
73
+ if hf_model_name != "" and hf_model_name in self.list_llm:
74
+ self.hf_model_name = hf_model_name
75
+ print(f"using HF Model {self.hf_model_name}")
76
+ self.model = HuggingFaceEndpoint(repo_id=self.hf_model_name, temperature=0.001, max_new_tokens=4000)
77
+ #self.model = HuggingFacePipeline.from_model_id(model_id=self.hf_model_name, task="text-generation",
78
+ # device=0,
79
+ # pipeline_kwargs={"max_new_tokens": 4000},
80
+ # model_kwargs={"temperature": 0.001, "max_length": 8000})
81
 
82
  def extract_resume_fields(self, full_text):
83
  """
 
103
  prompt_template = PromptTemplate(
104
  template=template,
105
  input_variables=["resume"],
106
+ partial_variables={"json_schema": json_schema},
107
  )
108
  # Invoke the language model and process the resume
109
  formatted_input = prompt_template.format_prompt(resume=full_text)
 
113
  output = llm.invoke(formatted_input.to_string())
114
  print(cb)
115
 
116
+ #print(output) # Print the output object for debugging
117
  if isinstance(output, BaseMessage):
118
  output = output.content
119
  try:
 
138
  return output
139
 
140
 
 
 
 
 
 
141
  def match_resume_with_job_description(self, resume_txt, job_description):
142
  with open("prompts/job_description_matching.prompt", "r") as f:
143
  template = f.read()
 
159
  output = output.content
160
  return output
161
 
162
+ class StructuredResumeParser:
163
+ list_llm = [
164
+ "mistralai/Mixtral-8x7B-Instruct-v0.1",
165
+ "mistralai/mistral-7b-instruct-v0.2",
166
+ "microsoft/phi-2",
167
+ "google/gemma-7b-it",
168
+ "HuggingFaceH4/zephyr-7b-beta",
169
+ "HuggingFaceH4/zephyr-7b-gemma-v0.1",
170
+ ]
171
+ def __init__(self, use_openai=False, openai_key=""):
172
+ self.use_openai = use_openai
173
+ self.openai_key = ""
174
+ self.model = None
175
+ self.hf_model_name = self.list_llm[0]
176
+ self.openai_model_name = "gpt-3.5-turbo" #"gpt-4-1106-preview"
177
+ self.set_key(openai_key)
178
+ self.set_model()
179
+
180
+ def set_key(self, openai_key=""):
181
+ self.openai_key = openai_key
182
+ if len(self.openai_key) == 0 and "OPENAI_API_KEY" in os.environ:
183
+ self.openai_key = os.environ["OPENAI_API_KEY"]
184
+
185
+ def set_model(self, hf_model_name=""):
186
+ if self.use_openai:
187
+ print(f"using OpenAI Model {self.openai_model_name}")
188
+ self.model = ChatOpenAI(temperature=0, model=self.openai_model_name, max_tokens=2500, openai_api_key=self.openai_key)
189
+ else:
190
+ if hf_model_name != "" and hf_model_name in self.list_llm:
191
+ self.hf_model_name = hf_model_name
192
+ print(f"using Together Model {self.hf_model_name}")
193
+ self.model = ChatOpenAI(
194
+ base_url="https://api.together.xyz/v1",
195
+ api_key=os.environ["TOGETHER_API_KEY"],
196
+ model=self.hf_model_name,
197
+ )
198
+
199
+ def extract_resume_fields(self, full_text):
200
+ """
201
+ Analyze a resume text and extract structured information using a specified language model.
202
 
203
+ Parameters:
204
+ full_text (str): The text content of the resume.
205
+ model (str): The language model object to use for processing the text.
206
+
207
+ Returns:
208
+ dict: A dictionary containing structured information extracted from the resume.
209
+ """
210
+ # The Resume object is imported from the local resume_template file
211
+
212
+ with open("prompts/resume_extraction_structured.prompt", "r") as f:
213
+ template = f.read()
214
+
215
+ prompt_template = PromptTemplate(
216
+ template=template,
217
+ input_variables=["resume"]
218
+ )
219
+ # Invoke the language model and process the resume
220
+ formatted_input = prompt_template.format_prompt(resume=full_text)
221
+ llm = self.model.with_structured_output(Resume)
222
+ with get_openai_callback() as cb:
223
+ output = llm.invoke(formatted_input.to_string())
224
+ print(cb)
225
+
226
+ return output
227
+
228
+
229
+ def match_resume_with_job_description(self, resume_txt, job_description):
230
+ with open("prompts/job_description_matching.prompt", "r") as f:
231
+ template = f.read()
232
+
233
+ prompt_template = PromptTemplate(
234
+ template=template,
235
+ input_variables=["resume", "job_description"],
236
+ )
237
+ # Invoke the language model and process the resume
238
+ formatted_input = prompt_template.format_prompt(resume=resume_txt, job_description=job_description)
239
+ llm = self.model
240
+ # print("llm", llm)
241
+ with get_openai_callback() as cb:
242
+ output = llm.invoke(formatted_input.to_string())
243
+ print(cb)
244
+
245
+ # print(output) # Print the output object for debugging
246
+ if isinstance(output, BaseMessage):
247
+ output = output.content
248
+ return output
249
 
250
 
251
  if __name__ == "__main__":
252
+ resume_file = "samples/0.pdf"
253
+ text = pdf_to_string(resume_file)
254
+ p = StructuredResumeParser(use_openai=False)
255
+ resume_data = p.extract_resume_fields(text)
256
+
257
+ '''
258
+ model = ChatOpenAI(
259
+ base_url="https://api.together.xyz/v1",
260
+ api_key=os.environ["TOGETHER_API_KEY"],
261
+ model="mistralai/Mixtral-8x7B-Instruct-v0.1",
262
+ )
263
+ model_with_structure = model.with_structured_output(Resume)
264
+
265
+ with open("prompts/resume_extraction_structured.prompt", "r") as f:
266
+ template = f.read()
267
+ prompt_template = PromptTemplate(
268
+ template=template,
269
+ input_variables=["resume"]
270
+ )
271
+ formatted_input = prompt_template.format_prompt(resume=text)
272
+ with get_openai_callback() as cb:
273
+ resume_data = model_with_structure.invoke(formatted_input.to_string())
274
+ print(cb)
275
+ '''
276
+ print(resume_data)
277
+
278
+
resume_template.py CHANGED
@@ -1,62 +1,63 @@
1
  from pydantic.v1 import BaseModel, Field, ValidationError
2
  from typing import List, Optional, Dict
3
 
4
- # The following classes are for the resume template
5
-
6
- class ContactInfo(BaseModel):
7
- email: Optional[str] = None
8
- phone: Optional[str] = None
9
- linkedin: Optional[str] = None
10
 
11
  class PersonalDetails(BaseModel):
12
- full_name: str
13
- contact_info: ContactInfo
14
- professional_summary: Optional[str] = None
 
 
 
 
 
15
 
16
  class Education(BaseModel):
17
- institution: Optional[str] = None
18
- degree: Optional[str] = None
19
- field_of_study: Optional[str] = None
20
- graduation_date: Optional[str] = None
 
 
 
 
21
 
22
  class WorkExperience(BaseModel):
23
- company: Optional[str] = None
24
- title: Optional[str] = None
25
- duration: Optional[str] = None
26
- description: Optional[str] = None
27
- notable_contributions: Optional[List[str]] = None
 
 
28
 
29
  class Project(BaseModel):
30
- name: Optional[str] = None
31
- description: Optional[str] = None
32
- technologies: Optional[str] = None
33
- role: Optional[str] = None
34
 
35
  class Certification(BaseModel):
36
- title: Optional[str] = None
37
- certifying_body: Optional[str] = None
38
- date: Optional[str] = None
39
 
40
  class Publication(BaseModel):
41
- title: Optional[str] = None
42
- co_authors: List[str] = []
43
- date: Optional[str] = None
44
 
45
  class Award(BaseModel):
46
- title: Optional[str] = None
47
- awarding_body: Optional[str] = None
48
- date: Optional[str] = None
49
 
50
  class VolunteerExperience(BaseModel):
51
- organization: Optional[str] = None
52
- role: Optional[str] = None
53
- duration: Optional[str] = None
54
- description: Optional[str] = None
55
-
56
- class AdditionalSections(BaseModel):
57
- volunteer_experience: Optional[List[VolunteerExperience]] = []
58
- languages: Optional[List[str]] = []
59
- interests: Optional[List[str]] = []
60
 
61
  class Resume(BaseModel):
62
  personal_details: PersonalDetails
@@ -67,4 +68,6 @@ class Resume(BaseModel):
67
  certifications: List[Certification] = []
68
  publications: List[Publication] = []
69
  awards: List[Award] = []
70
- additional_sections: Optional[AdditionalSections] = None
 
 
 
1
  from pydantic.v1 import BaseModel, Field, ValidationError
2
  from typing import List, Optional, Dict
3
 
 
 
 
 
 
 
4
 
5
  class PersonalDetails(BaseModel):
6
+ first_name: str = Field(default="", description="The first name of the person.")
7
+ last_name: str = Field(default="", description="The last name of the person.")
8
+ phone_number: Optional[str] = Field(default=None, description="The phone number of the person.")
9
+ linkedin_url: Optional[str] = Field(default=None, description="The url of the linkedin profile of the person.")
10
+ email_address: Optional[str] = Field(default=None, description="The email address of the person.")
11
+ nationality: Optional[str] = Field(default=None, description="The nationality of the person.")
12
+ professional_summary: Optional[str] = Field(default=None, description="The professional summary or the profile section of resume of the person")
13
+
14
 
15
  class Education(BaseModel):
16
+ degree: str = Field(default="", description="The degree obtained or expected.")
17
+ institution: str = Field(default="", description="The university, college, or educational institution visited.")
18
+ field_of_study: str = Field(default="", description="The field of study.")
19
+ country: Optional[str] = Field(default=None, description="The country of the institution.")
20
+ grade: Optional[str] = Field(default=None, description="The grade achieved or expected.")
21
+ start_date: Optional[str] = Field(default=None, description="When the study started.")
22
+ end_date: Optional[str] = Field(default=None, description="When the study ended.")
23
+
24
 
25
  class WorkExperience(BaseModel):
26
+ company: str = Field(default="", description="The company name of the work experience.")
27
+ job_title: str = Field(default="", description="The job title.")
28
+ description: Optional[str] = Field(default=None, description="The job or role description.")
29
+ start_date: Optional[str] = Field(default=None, description="When the job started.")
30
+ end_date: Optional[str] = Field(default=None, description="When the job ended.")
31
+ notable_contributions: List[str] = Field(default=[], description="notable contributions in the work experience")
32
+
33
 
34
  class Project(BaseModel):
35
+ name: str = Field(default="", description="The name of the project")
36
+ description: Optional[str] = Field(default=None, description="The description of the project")
37
+ technologies: Optional[str] = Field(default=None, description="the technologies used in the project")
38
+ role: Optional[str] = Field(default=None, description="The role of the person in the project")
39
 
40
  class Certification(BaseModel):
41
+ title: str = Field(default="", description="Title of the certificate")
42
+ certifying_body: Optional[str] = Field(default=None, description="The text or body of the certificate")
43
+ date: Optional[str] = Field(default=None, description="The Date of the certificate")
44
 
45
  class Publication(BaseModel):
46
+ title: str = Field(default="", description="The title of the publication")
47
+ co_authors: List[str] = Field(default=[], description="The list of other authors of the publication")
48
+ date: Optional[str] = Field(default=None, description="the date of publication")
49
 
50
  class Award(BaseModel):
51
+ title: str = Field(default="", description="Award Title")
52
+ awarding_body: Optional[str] = Field(default=None, description="the text or body of award")
53
+ date: Optional[str] = Field(default=None, description="the date of award")
54
 
55
  class VolunteerExperience(BaseModel):
56
+ organization: str = Field(default="", description="the organization name of volunteer experience")
57
+ description: Optional[str] = Field(default=None, description="the description of volunteer experience")
58
+ role: Optional[str] = Field(default=None, description="role of the person in the volunteer experience")
59
+ start_date: Optional[str] = Field(default=None, description="the start date of the volunteer experience")
60
+ end_date: Optional[str] = Field(default=None, description="the end date of the volunteer experience")
 
 
 
 
61
 
62
  class Resume(BaseModel):
63
  personal_details: PersonalDetails
 
68
  certifications: List[Certification] = []
69
  publications: List[Publication] = []
70
  awards: List[Award] = []
71
+ volunteer_experience: List[VolunteerExperience] = []
72
+ languages: List[str] = []
73
+ interests: List[str] = []
samples/1.pdf ADDED
Binary file (165 kB). View file
 
samples/2.pdf ADDED
Binary file (225 kB). View file
 
samples/jobs/0.txt DELETED
@@ -1 +0,0 @@
1
- Job brief. We are looking for a Software Developer to build and implement functional programs. You will work with other Developers and Product Managers throughout the software development life cycle. In this role, you should be a team player with a keen eye for detail and problem-solving skills.
 
 
samples/jobs/1.txt DELETED
@@ -1,26 +0,0 @@
1
- We are looking for a Software Developer to build and implement functional programs. You will work with other Developers and Product Managers throughout the software development life cycle.
2
-
3
- In this role, you should be a team player with a keen eye for detail and problem-solving skills. If you also have experience in Agile frameworks and popular coding languages (e.g. JavaScript), we’d like to meet you.
4
-
5
- Your goal will be to build efficient programs and systems that serve user needs.
6
-
7
- Responsibilities
8
- Work with developers to design algorithms and flowcharts
9
- Produce clean, efficient code based on specifications
10
- Integrate software components and third-party programs
11
- Verify and deploy programs and systems
12
- Troubleshoot, debug and upgrade existing software
13
- Gather and evaluate user feedback
14
- Recommend and execute improvements
15
- Create technical documentation for reference and reporting
16
- Requirements and skills
17
- Proven experience as a Software Developer, Software Engineer or similar role
18
- Familiarity with Agile development methodologies
19
- Experience with software design and development in a test-driven environment
20
- Knowledge of coding languages (e.g. C++, Java, JavaScript) and frameworks/systems (e.g. AngularJS, Git)
21
- Experience with databases and Object-Relational Mapping (ORM) frameworks (e.g. Hibernate)
22
- Ability to learn new languages and technologies
23
- Excellent communication skills
24
- Resourcefulness and troubleshooting aptitude
25
- Attention to detail
26
- BSc/BA in Computer Science, Engineering or a related field
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
samples/jobs/application support engineer.txt ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ We are seeking a knowledgeable Application Support Engineer to monitor and maintain the efficiency of our software applications. In this role, your duties will include reporting to our senior software engineering team, collaborating with colleagues, and performing successful code migration. You will also be required to provide IT support to our clients.
2
+
3
+ To ensure success as an Application Support Engineer, you should possess extensive experience in providing application support in a fast-paced environment. Top-Notch Application Support Engineers distinguish themselves by being proactive in providing application support.
4
+
5
+ Application Support Engineer Responsibilities:
6
+ Providing software application support under the supervision of the Senior Engineer.
7
+ Performing analyses on software application functionality and suggesting improvements.
8
+ Ensuring effective front end and back end functionality of applications.
9
+ Consulting with the software development team, internal users, and clients to improve application performance.
10
+ Managing code migration across environments to ensure continued and synchronized functionality.
11
+ Establishing the root causes of application errors, and escalating serious concerns to the Senior Engineer.
12
+ Keeping record of configuration changes and scheduling application updates.
13
+ Documenting processes and monitoring application performance metrics.
14
+ Providing front end support to clients and colleagues in other departments.
15
+ Application Support Engineer Requirements:
16
+ A Bachelor's Degree in Software Engineering, Computer Science, Information Technology, Information Systems, Computer Engineering, or similar.
17
+ Demonstrable experience as an Application Support Engineer in a related field.
18
+ Advanced knowledge of front end and back end programming languages, such as C++, Javascript, Python, and Ruby.
19
+ Ability to manage code migration, document configuration changes, and monitor performance.
20
+ Exceptional ability to provide front end support to internal departments and web-based clients.
21
+ Advanced proficiency in determining the causes of application errors and repairing them.
22
+ Knowledge of Advanced Encryption Standards (AES).
23
+ Ability to keep up with innovation in application design.
24
+ Exceptional communication skills.
samples/jobs/backend developer.txt ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ We are looking for an analytical, results-driven Back-end Developer who will work with team members to troubleshoot and improve current back-end applications and processes. The Back-end Developer will use his or her understanding of programming languages and tools to analyze current codes and industry developments, formulate more efficient processes, solve problems, and create a more seamless experience for users. You should have excellent communication, computer, and project management skills.
2
+
3
+ To succeed as a Backend Developer, you should be focused on building a better, more efficient program and creating a better end-user experience. You should be knowledgeable, collaborative, and motivated.
4
+
5
+ Back-end Developer Responsibilities:
6
+ Compile and analyze data, processes, and codes to troubleshoot problems and identify areas for improvement.
7
+ Collaborating with the front-end developers and other team members to establish objectives and design more functional, cohesive codes to enhance the user experience.
8
+ Developing ideas for new programs, products, or features by monitoring industry developments and trends.
9
+ Recording data and reporting it to proper parties, such as clients or leadership.
10
+ Participating in continuing education and training to remain current on best practices, learn new programming languages, and better assist other team members.
11
+ Taking lead on projects, as needed.
12
+ Back-end Developer Requirements:
13
+ Bachelor?s degree in computer programming, computer science, or a related field.
14
+ More education or experience may be required.
15
+ Fluency or understanding of specific languages, such as Java, PHP, or Python, and operating systems may be required.
16
+ Strong understanding of the web development cycle and programming techniques and tools.
17
+ Focus on efficiency, user experience, and process improvement.
18
+ Excellent project and time management skills.
19
+ Strong problem solving and verbal and written communication skills.
20
+ Ability to work independently or with a group.
21
+ Willingness to sit at desk for extended periods.
samples/jobs/big data engineer.txt ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ We are looking to hire a talented Big Data Engineer to develop and manage our company?s Big Data solutions. In this role, you will be required to design and implement Big Data tools and frameworks, implement ELT processes, collaborate with development teams, build cloud platforms, and maintain the production system.
2
+
3
+ To ensure success as a Big Data Engineer, you should have in-depth knowledge of Hadoop technologies, excellent project management skills, and high-level problem-solving skills. A top-notch Big Data Engineer understands the needs of the company and institutes scalable data solutions for its current and future needs.
4
+
5
+ Big Data Engineer Responsibilities:
6
+ Meeting with managers to determine the company?s Big Data needs.
7
+ Developing Hadoop systems.
8
+ Loading disparate data sets and conducting pre-processing services using Hive or Pig.
9
+ Finalizing the scope of the system and delivering Big Data solutions.
10
+ Managing the communications between the internal system and the survey vendor.
11
+ Collaborating with the software research and development teams.
12
+ Building cloud platforms for the development of company applications.
13
+ Maintaining production systems.
14
+ Training staff on data resource management.
15
+ Big Data Engineer Requirements:
16
+ Bachelor?s degree in Computer Engineering or Computer Science.
17
+ Previous experience as a Big Data Engineer.
18
+ In-depth knowledge of Hadoop, Spark, and similar frameworks.
19
+ Knowledge of scripting languages including Java, C++, Linux, Ruby, PHP, Python, and R.
20
+ Knowledge of NoSQL and RDBMS databases including Redis and MongoDB.
21
+ Familiarity with Mesos, AWS, and Docker tools.
22
+ Excellent project management skills.
23
+ Good communication skills.
24
+ Ability to solve complex networking, data, and software issues.
samples/jobs/c developer.txt ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ We are looking to hire a skilled C Developer to join our dynamic IT team. Your primary responsibility will be to develop and code C modules and embedded systems for high-level languages that are reliable and easy to maintain. You may also be required to implement performance modules, identify bottlenecks, and fix bugs.
2
+
3
+ To ensure success as a C Developer, you should be proficient in C and C++ languages, exhibit strong problem-solving skills, and have a good understanding of code versioning tools. Ultimately, a top-notch C Developer can create clean, reusable code that perfectly integrates with other higher-level languages such as Java, Go, Node.js, and Python.
4
+
5
+ C Developer Responsibilities:
6
+ Meeting with the IT and design team to discuss application requirements.
7
+ Designing and building reliable and clean C code.
8
+ Developing kernel modules, libraries, and embedded systems for other high-level languages.
9
+ Implementing quality and performance modules.
10
+ Identifying bottlenecks or bugs and troubleshooting integration issues.
11
+ Testing code quality and durability.
12
+ Maintaining the automation and quality of the code.
13
+ C Developer Requirements:
14
+ Bachelor?s degree in Computer Science, Mathematics or related field.
15
+ Proven work experience as a C Developer.
16
+ Proficiency in C and C++.
17
+ Knowledge of high-level leagues including Java, Python, Go and Node.js.
18
+ Familiarity with language tools such as Valgrind and Lint.
19
+ Good understanding of code versioning tools such as SVN, Mercurial, and Git.
20
+ Knowledge of systems design and low-level hardware interactions.
21
+ In-depth knowledge of STL and BOOST.
22
+ Good problem-solving skills.
23
+ Ability to project manage.
samples/jobs/computer engineer.txt ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ We are searching for a talented and experienced Computer Engineer to join our dynamic team. As the Computer Engineer, you will play a vital role in our Information Technology (IT) department, performing a range of duties including designing, testing, and inspecting all software used within the company.
2
+
3
+ The successful candidate will have in-depth knowledge of design analytics, algorithms, analysis tools, and object orientated modeling. To excel in this position, all candidates should be critical and creative thinkers, with excellent communication and problem-solving skills.
4
+
5
+ Responsibilities:
6
+ Perform periodic hardware analysis of computer hardware and software using available technology and testing tools.
7
+ Respond to all computer-related issues and provide technical support to all staff members.
8
+ Oversee the company?s cloud storage accounts to guarantee they?re protected and secure.
9
+ Conduct validation testing for new and renovated motherboards.
10
+ Ensure existing computer equipment are up-to-date.
11
+ Stay up-to-date with the latest technologies and incorporate new technology into existing units.
12
+ Draft new computer equipment blueprints and present them to management.
13
+ Plan and manage the production of computer hardware equipment.
14
+ Develop and install software systems.
15
+ Requirements:
16
+ Bachelor?s degree in Computer Engineering, Computer Science or a relevant field.
17
+ A minimum of 3 years? experience in a similar role.
18
+ Strong knowledge of design analytics, algorithms, and measuring tools.
19
+ Excellent verbal and written communication skills.
20
+ A creative thinker with good analytical abilities.
21
+ Proficient in problem-solving.
samples/jobs/data engineer.txt ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ We are searching for an accountable, multitalented Data Engineer to facilitate the operations of our Data Scientists. The Data Engineer will be responsible for employing machine learning techniques to create and sustain structures that allow for the analysis of data, while remaining familiar with dominant programming and deployment strategies in the field. During various aspects of this process, you should collaborate with coworkers to ensure that your approach meets the needs of each project.
2
+
3
+ To ensure success as a Data Engineer, you should demonstrate flexibility, creativity, and the capacity to receive and utilize constructive criticism. A formidable Data Engineer will demonstrate unsatiated curiosity and outstanding interpersonal skills.
4
+
5
+ Data Engineer Responsibilities:
6
+ Liaising with coworkers and clients to elucidate the requirements for each task.
7
+ Conceptualizing and generating infrastructure that allows big data to be accessed and analyzed.
8
+ Reformulating existing frameworks to optimize their functioning.
9
+ Testing such structures to ensure that they are fit for use.
10
+ Preparing raw data for manipulation by Data Scientists.
11
+ Detecting and correcting errors in your work.
12
+ Ensuring that your work remains backed up and readily accessible to relevant coworkers.
13
+ Remaining up-to-date with industry standards and technological advancements that will improve the quality of your outputs.
14
+ Data Engineer Requirements:
15
+ Bachelor's degree in Data Engineering, Big Data Analytics, Computer Engineering, or related field.
16
+ Master's degree in a relevant field is advantageous.
17
+ Proven experience as a Data Engineer, Software Developer, or similar.
18
+ Expert proficiency in Python, C++, Java, R, and SQL.
19
+ Familiarity with Hadoop or suitable equivalent.
20
+ Excellent analytical and problem-solving skills.
21
+ A knack for independent and group work.
22
+ Scrupulous approach to duties.
23
+ Capacity to successfully manage a pipeline of duties with minimal supervision.
samples/jobs/full stack developer.txt ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ We are looking for a highly skilled computer programmer who is comfortable with both front and back end programming. Full Stack Developers are responsible for developing and designing front end web architecture, ensuring the responsiveness of applications and working alongside graphic designers for web design features, among other duties.
2
+
3
+ Full Stack Developers will be required to see out a project from conception to final product, requiring good organizational skills and attention to detail.
4
+
5
+ Full Stack Developer Responsibilities:
6
+ Developing front end website architecture.
7
+ Designing user interactions on web pages.
8
+ Developing back end website applications.
9
+ Creating servers and databases for functionality.
10
+ Ensuring cross-platform optimization for mobile phones.
11
+ Ensuring responsiveness of applications.
12
+ Working alongside graphic designers for web design features.
13
+ Seeing through a project from conception to finished product.
14
+ Designing and developing APIs.
15
+ Meeting both technical and consumer needs.
16
+ Staying abreast of developments in web applications and programming languages.
17
+ Full Stack Developer Requirements:
18
+ Degree in Computer Science.
19
+ Strong organizational and project management skills.
20
+ Proficiency with fundamental front end languages such as HTML, CSS and JavaScript.
21
+ Familiarity with JavaScript frameworks such as Angular JS, React and Amber.
22
+ Proficiency with server side languages such as Python, Ruby, Java, PHP and .Net.
23
+ Familiarity with database technology such as MySQL, Oracle and MongoDB.
24
+ Excellent verbal communication skills.
25
+ Good problem solving skills.
26
+ Attention to detail.
samples/jobs/full stack engineer.txt ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ We are looking for an experienced Full Stack Engineer to join our development team. In this role, you will be responsible for the overall development and implementation of front and back-end software applications. Your responsibilities will extend from designing system architecture to high-level programming, performance testing, and systems integration.
2
+
3
+ To ensure success as a Full Stack Engineer, you should have advanced programming skills, experience with application development, and excellent troubleshooting skills. Top-rated Full Stack Engineers create and implement advanced software systems that perfectly meet the needs of the company.
4
+
5
+ Full Stack Engineer Responsibilities:
6
+ Meeting with the software development team to define the scope and scale of software projects.
7
+ Designing software system architecture.
8
+ Completing data structures and design patterns.
9
+ Designing and implementing scalable web services, applications, and APIs.
10
+ Developing and maintaining internal software tools.
11
+ Writing low-level and high-level code.
12
+ Troubleshooting and bug fixing.
13
+ Identifying bottlenecks and improving software efficiency.
14
+ Collaborating with the design team on developing micro-services.
15
+ Writing technical documents.
16
+ Full Stack Engineer Requirements:
17
+ Bachelor?s degree in Computer Engineering or Computer Science.
18
+ Previous experience as a Full Stack Engineer.
19
+ Advanced knowledge of front-end languages including HTML5, CSS, JavaScript, C++, and JQuery.
20
+ Proficient in back-end languages including Java, Python, Rails, Ruby, .NET, and PHP.
21
+ Knowledge of database systems and SQL.
22
+ Advanced troubleshooting skills.
23
+ Familiarity with JavaScript frameworks.
24
+ Good communication skills.
25
+ High-level project management skills.
samples/jobs/hadoop developer.txt ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ We are looking to hire a skilled Hadoop Developer to help build Big Data infrastructure and storage software. Your primary responsibility will be to design, build, and maintain Hadoop infrastructure. You may also be required to evaluate existing data solutions, write scalable ETLs, develop documentation, and train staff.
2
+
3
+ To ensure success as a Hadoop Developer, you should have in-depth knowledge of Hadoop API, high-level programming skills, and the ability to project manage. Ultimately, a top-class Hadoop developer designs and implements bespoke Hadoop applications to manage current and future Big Data infrastructures.
4
+
5
+ Hadoop Developer Responsibilities:
6
+ Meeting with the development team to assess the company?s Big Data infrastructure.
7
+ Designing and coding Hadoop applications to analyze data collections.
8
+ Creating data processing frameworks.
9
+ Extracting data and isolating data clusters.
10
+ Testing scripts and analyzing results.
11
+ Troubleshooting application bugs.
12
+ Maintaining the security of company data.
13
+ Creating data tracking programs.
14
+ Producing Hadoop development documentation.
15
+ Training staff on application use.
16
+ Hadoop Developer Requirements:
17
+ Bachelor?s degree in Software Engineering or Computer Science.
18
+ Previous experience as a Hadoop Developer or Big Data Engineer.
19
+ Advanced knowledge of the Hadoop ecosystem and its components.
20
+ In-depth knowledge of Hive, HBase, and Pig.
21
+ Familiarity with MapReduce and Pig Latin Scripts.
22
+ Knowledge of back-end programming languages including JavaScript, Node.js, and OOAD.
23
+ Familiarity with data loading tools including Squoop and Flume.
24
+ High-level analytical and problem-solving skills.
25
+ Good project management and communication skills.
samples/jobs/sales application engineer.txt ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ We are seeking a knowledgeable Sales Applications Engineer to create high-end applications that will increase our company's sales. In this role, your duties will include developing software applications, tracking consumer trends, and training our sales department on the technical specifications of applications. You will also be required to provide support to our clients.
2
+
3
+ To ensure success as a Sales Applications Engineer, you should demonstrate extensive experience in application engineering, as well as in-depth knowledge of a sales environment. Outstanding Sales Applications Engineers ensure that their application expertise translates to product innovation and increased sales.
4
+
5
+ Sales Applications Engineer Responsibilities:
6
+ Performing analyses on software applications and services.
7
+ Ensuring that product offerings and functionalities are aligned with consumer trends.
8
+ Consulting with management and sales teams on product development.
9
+ Performing application installations, updates, and maintenance.
10
+ Training salespeople on product specifications and service offerings.
11
+ Evaluating system performance metrics and improving front end functionality.
12
+ Supporting clients with application installations, system optimization, and troubleshooting.
13
+ Improving application functionality by incorporating client feedback.
14
+ Reviewing product specifications and analyzing competitor behavior.
15
+ Performing diagnostic tests and resolving logged errors.
16
+ Sales Applications Engineer Requirements:
17
+ A Bachelor's Degree in Software Engineering, Computer Engineering, Computer Science, Information Technology, or similar.
18
+ Extensive experience in application engineering in a sales environment.
19
+ Advanced proficiency in coding and scripting languages, such as C#, Python, Ruby, or JavaScript.
20
+ Advanced knowledge of software application development, installation, and maintenance.
21
+ Ability to liaise with management and the sales department on application development.
22
+ Proficiency in training sales staff on product specifications and application functionalities.
23
+ Exceptional ability to drive application innovation by analyzing consumer and competitor trends.
24
+ Ability to evaluate client feedback and improve front end application functionality.
25
+ Advanced ability to document processes, run diagnostic tests, and repair errors.
26
+ Proficiency in providing clients with technical product and services support.