I am using regex to extract specific sections from resumes, such as key skills, summary, and work experience. The approach involves:
First, I extract the text from the resume based on predefined sections (e.g., "Skills," "Summary," "Work Experience") which is done through api and gives result in json. This involves identifying the boundaries of each section. There is no problem till here.
I used regex only on for extracting sections and after extracting those sections i am just passing the name of the section to extract relevant details. For instance, if the section is "Skills," the regex will capture all the text under the "Skills" section until the next section begins.
However, this approach has limitations, especially with templates that vary significantly. The regex patterns used to identify and extract sections may not work consistently across different templates, which poses a challenge.
for section:
def get_section(text, section_name):
"""
Extract a specific section from the text based on the section name.
Returns the text belonging to that section until the next section is found.
"""
pattern = re.compile(
rf'\b{section_name}\b\s*([\s\S]*?)(?=\b(EDUCATION|WORK EXPERIENCE|EXPERIENCE|SKILLS|SUMMARY)\b|$)',
re.IGNORECASE
)
match = pattern.search(text)
if match:
return match.group(1).strip()
return None
for skills:
def extract_skills(text):
"""Extract the skills section from the text."""
return get_section(text, 'SKILLS') or "Skills not found"
for summary:
def extract_summary(text):
"""Extract the summary section from the text."""
return get_section(text, 'SUMMARY') or "Summary not found"
The sample resume :
Muhammad Arsalan Khan
Karachi, Sindh, Pakistan [email protected] a +923122427609 in/arsalan-khan 57930282
SUMMARY:
To secure a position in a prestigious organization where I can leverage my professional skills to drive business growth and efficiency. My passion for:
automation and process optimization is geared toward making operations more effective and achieving both organizational and personal career goals.
EXPERIENCE:
Branch Manager
Daewoo FastEx
February 2020 - Present, Dawoo Franchise, Paposh, Karachi
• Led a team of 5+ staff members, ensuring smooth daily operations and efficient workflow.
• We have implemented process optimization strategies, resulting in a 20% increase in operational efficiency.
• Managed customer relations and resolved issues to maintain high customer satisfaction.
• Handled inventory management, procurement, and vendor relations to ensure seamless operations.
• Developed and executed marketing strategies that increased sales by 15%.
• Conducted performance evaluations and provided training and development opportunities for team members.
• Implemented a streamlined cargo booking system that increased booking efficiency by 25%, utilizing advanced logistics software and coordinating closely
with freight carriers and clients to ensure timely deliveries.
Cargo Booking Officer
Daewoo FastEx
January 2016 - December 2018, Daewoo Franchise, Hydri, Karachi
• Managed cargo bookings, ensuring accuracy in documentation and timely dispatches.
• Coordinated with vendors and clients to arrange transportation and track shipments.
• Provided excellent customer support by addressing inquiries and resolving issues related to cargo services.
• Developed and maintained relationships with key stakeholders, contributing to repeat business.
• Monitored and reported on cargo performance metrics to senior management.
Garments Outlet Manager
The Fifth Street
January 2015 - December 2015, Franchise, Hyderi, Karachi
• Oversaw day-to-day operations of the garment outlet, managing a team of 10 sales associates.
• Implemented visual merchandising strategies to attract customers and drive sales.
• Managed inventory, ordering, and stock replenishment to ensure product availability.
• Trained staff on sales techniques, product knowledge, and customer service standards.
• Analyzed sales data to identify trends and adjust strategies accordingly, resulting in a 10% increase in sales.
Booking Officer
ASF Pharma, Karachi
• Handled booking of pharmaceutical products, ensuring timely delivery to clients.
• Coordinated with logistics teams to ensure accurate and on-time deliveries.
• Maintained booking records and provided regular updates to clients regarding their orders.
• Assisted in resolving any booking-related issues, maintaining strong client relationships.
• Contributed to process improvements that reduced booking errors by 15%.
EDUCATION:
Bachelor of Business Administration
Virtual University of Pakistan • Karachi, Pakistan • 2028
DAE in Electrical Engineering
Jinnah Polytechnic Institute, Karachi • Karachi, Pakistan • 2020 • B
Matriculation
Prince Public Secondary School, Karachi • Karachi, Pakistan • 2017 • A
CERTIFICATIONS:
MS-Office (Office Automation)
National Institute of Computer Education, Karachi • 2016:
Graphic Designing
National Institute of Computer Education, Karachi •:
2015
SKILLS:
Data Entry Management, Customer Support, Communication, Leadership
January 2014 - December 2014, Karachi, Pakistan
OUTPUT:
{
"file": "resumes/Arsalan Khan (2).pdf",
"data": {
"name": "Muhammad Arsalan Khan",
"phone_number": "+923122427609",
"email": "[email protected]",
"summary": "To secure a position in a prestigious organization where I can leverage my professional",
"experience": "Branch Manager Daewoo FastEx February 2020 - Present, Dawoo Franchise, Paposh, Karachi Led a team of 5+ staff members, ensuring smooth daily operations and efficient workflow. We have implemented process optimization strategies, resulting in a 20% increase in operational efficiency. Managed customer relations and resolved issues to maintain high customer satisfaction. Handled inventory management, procurement, and vendor relations to ensure seamless operations. Developed and executed marketing strategies that increased sales by 15%. Conducted performance evaluations and provided training and development opportunities for team members. Implemented a streamlined cargo booking system that increased booking efficiency by 25%, utilizing advanced logistics software and coordinating closely with freight carriers and clients to ensure timely deliveries. Cargo Booking Officer Daewoo FastEx January 2016 - December 2018, Daewoo Franchise, Hydri, Karachi Managed cargo bookings, ensuring accuracy in documentation and timely dispatches. Coordinated with vendors and clients to arrange transportation and track shipments. Provided excellent customer support by addressing inquiries and resolving issues related to cargo services. Developed and maintained relationships with key stakeholders, contributing to repeat business. Monitored and reported on cargo performance metrics to senior management. Garments Outlet Manager The Fifth Street January 2015 - December 2015, Franchise, Hyderi, Karachi Oversaw day-to-day operations of the garment outlet, managing a team of 10 sales associates. Implemented visual merchandising strategies to attract customers and drive sales. Managed inventory, ordering, and stock replenishment to ensure product availability. Trained staff on sales techniques, product knowledge, and customer service standards. Analyzed sales data to identify trends and adjust strategies accordingly, resulting in a 10% increase in sales. Booking Officer ASF Pharma, Karachi Handled booking of pharmaceutical products, ensuring timely delivery to clients. Coordinated with logistics teams to ensure accurate and on-time deliveries. Maintained booking records and provided regular updates to clients regarding their orders. Assisted in resolving any booking-related issues, maintaining strong client relationships. Contributed to process improvements that reduced booking errors by 15%.",
"skills": "to drive business growth and efficiency. My passion for automation and process optimization is geared toward making operations more effective and achieving both organizational and personal career goals.",
"education": "Bachelor of Business Administration Virtual University of Pakistan Karachi, Pakistan 2028 DAE in Electrical Engineering Jinnah Polytechnic Institute, Karachi Karachi, Pakistan 2020 B Matriculation Prince Public Secondary School, Karachi Karachi, Pakistan 2017 A"
}
i want to know why is the output of skills showing the contents of the summary ,and summary having half of the contents and an optimize approach to solve this problem.