1
mirror of https://github.com/xitanggg/open-resume synced 2025-03-09 07:49:18 +01:00

Add summary to section title keyword to help parse LinkedIn resume -

This commit is contained in:
Xitang 2023-07-03 16:09:46 -07:00
parent 3d5841dc15
commit ed8d70b3fc
2 changed files with 10 additions and 2 deletions
src/app/lib/parse-resume-from-pdf

@ -150,8 +150,14 @@ export const extractProfile = (sections: ResumeSectionToLines) => {
textItems, textItems,
SUMMARY_FEATURE_SETS SUMMARY_FEATURE_SETS
); );
const summaryLines = getSectionLinesByKeywords(sections, ["summary"]);
const summarySection = summaryLines
.flat()
.map((textItem) => textItem.text)
.join(" ");
const objectiveLines = getSectionLinesByKeywords(sections, ["objective"]); const objectiveLines = getSectionLinesByKeywords(sections, ["objective"]);
const objective = objectiveLines const objectiveSection = objectiveLines
.flat() .flat()
.map((textItem) => textItem.text) .map((textItem) => textItem.text)
.join(" "); .join(" ");
@ -163,7 +169,8 @@ export const extractProfile = (sections: ResumeSectionToLines) => {
phone, phone,
location, location,
url, url,
summary: objective || summary, // Dedicated section takes higher precedence over profile summary
summary: summarySection || objectiveSection || summary,
}, },
// For debugging // For debugging
profileScores: { profileScores: {

@ -52,6 +52,7 @@ const SECTION_TITLE_SECONDARY_KEYWORDS = [
"course", "course",
"extracurricular", "extracurricular",
"objective", "objective",
"summary", // LinkedIn generated resume has a summary section
"award", "award",
"honor", "honor",
"project", "project",