diff --git a/src/app/lib/parse-resume-from-pdf/extract-resume-from-sections/extract-profile.ts b/src/app/lib/parse-resume-from-pdf/extract-resume-from-sections/extract-profile.ts index 2c0e5ac..b627688 100644 --- a/src/app/lib/parse-resume-from-pdf/extract-resume-from-sections/extract-profile.ts +++ b/src/app/lib/parse-resume-from-pdf/extract-resume-from-sections/extract-profile.ts @@ -150,8 +150,14 @@ export const extractProfile = (sections: ResumeSectionToLines) => { textItems, SUMMARY_FEATURE_SETS ); + + const summaryLines = getSectionLinesByKeywords(sections, ["summary"]); + const summarySection = summaryLines + .flat() + .map((textItem) => textItem.text) + .join(" "); const objectiveLines = getSectionLinesByKeywords(sections, ["objective"]); - const objective = objectiveLines + const objectiveSection = objectiveLines .flat() .map((textItem) => textItem.text) .join(" "); @@ -163,7 +169,8 @@ export const extractProfile = (sections: ResumeSectionToLines) => { phone, location, url, - summary: objective || summary, + // Dedicated section takes higher precedence over profile summary + summary: summarySection || objectiveSection || summary, }, // For debugging profileScores: { diff --git a/src/app/lib/parse-resume-from-pdf/group-lines-into-sections.ts b/src/app/lib/parse-resume-from-pdf/group-lines-into-sections.ts index 6cce0ce..117b085 100644 --- a/src/app/lib/parse-resume-from-pdf/group-lines-into-sections.ts +++ b/src/app/lib/parse-resume-from-pdf/group-lines-into-sections.ts @@ -52,6 +52,7 @@ const SECTION_TITLE_SECONDARY_KEYWORDS = [ "course", "extracurricular", "objective", + "summary", // LinkedIn generated resume has a summary section "award", "honor", "project",