1
mirror of https://github.com/xitanggg/open-resume synced 2024-11-03 09:19:21 +01:00

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

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

View File

@ -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: {

View File

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