From a3e1d2db74f3562046a92c12752ff6f69b65e710 Mon Sep 17 00:00:00 2001 From: Yassir LAIRGI Date: Fri, 20 Sep 2024 06:29:22 +0200 Subject: [PATCH] constructing job offers graph in one pass --- examples/different_llm_models.ipynb | 103 ++++++++++++++-------------- 1 file changed, 50 insertions(+), 53 deletions(-) diff --git a/examples/different_llm_models.ipynb b/examples/different_llm_models.ipynb index b515c9f..d289210 100644 --- a/examples/different_llm_models.ipynb +++ b/examples/different_llm_models.ipynb @@ -87,7 +87,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 2, "metadata": {}, "outputs": [], "source": [ @@ -177,7 +177,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 3, "metadata": {}, "outputs": [], "source": [ @@ -189,7 +189,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 4, "metadata": {}, "outputs": [], "source": [ @@ -201,7 +201,7 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 5, "metadata": {}, "outputs": [], "source": [ @@ -217,7 +217,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 6, "metadata": {}, "outputs": [], "source": [ @@ -233,7 +233,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 7, "metadata": {}, "outputs": [], "source": [ @@ -316,7 +316,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 8, "metadata": {}, "outputs": [], "source": [ @@ -348,7 +348,7 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 9, "metadata": {}, "outputs": [], "source": [ @@ -364,7 +364,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 10, "metadata": {}, "outputs": [], "source": [ @@ -373,7 +373,7 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 13, "metadata": {}, "outputs": [], "source": [ @@ -390,7 +390,7 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": 14, "metadata": {}, "outputs": [], "source": [ @@ -415,34 +415,16 @@ }, { "cell_type": "code", - "execution_count": 18, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "[INFO] Extracting Entities from the Document 1\n", - "{'entities': [{'label': 'Person', 'name': 'Emily Davis'}, {'label': 'Contact Information', 'name': '+1 567 890 1234'}, {'label': 'Profession', 'name': 'Graphic Designer'}, {'label': 'Company', 'name': 'MNO Creative'}, {'label': 'Location', 'name': 'Boston, MA'}, {'label': 'Degree', 'name': 'Bachelor of Fine Arts in Graphic Design'}, {'label': 'Institution', 'name': 'Rhode Island School of Design'}, {'label': 'Certification', 'name': 'Adobe Certified Expert'}, {'label': 'Certification', 'name': 'UX Design Certification by Nielsen Norman Group'}, {'label': 'Skill', 'name': 'Adobe Creative Suite (Photoshop, Illustrator, InDesign)'}, {'label': 'Skill', 'name': 'Sketch'}, {'label': 'Skill', 'name': 'Figma'}, {'label': 'Skill', 'name': 'Creativity'}, {'label': 'Skill', 'name': 'Communication'}, {'label': 'Skill', 'name': 'Time management'}]}\n", - "[INFO] Extracting Relations from the Document 1\n", - "{'relationships': [{'startNode': 'emily davis', 'endNode': '+1 567 890 1234', 'name': 'has phone number'}, {'startNode': 'emily davis', 'endNode': 'graphic designer', 'name': 'is a'}, {'startNode': 'emily davis', 'endNode': 'mno creative', 'name': 'works at'}, {'startNode': 'mno creative', 'endNode': 'boston, ma', 'name': 'located in'}, {'startNode': 'emily davis', 'endNode': 'bachelor of fine arts in graphic design', 'name': 'holds degree'}, {'startNode': 'bachelor of fine arts in graphic design', 'endNode': 'rhode island school of design', 'name': 'awarded by'}, {'startNode': 'emily davis', 'endNode': 'adobe certified expert', 'name': 'holds certification'}, {'startNode': 'emily davis', 'endNode': 'ux design certification by nielsen norman group', 'name': 'holds certification'}, {'startNode': 'emily davis', 'endNode': 'adobe creative suite (photoshop, illustrator, indesign)', 'name': 'has skill'}, {'startNode': 'emily davis', 'endNode': 'sketch', 'name': 'has skill'}, {'startNode': 'emily davis', 'endNode': 'figma', 'name': 'has skill'}, {'startNode': 'emily davis', 'endNode': 'creativity', 'name': 'has skill'}, {'startNode': 'emily davis', 'endNode': 'communication', 'name': 'has skill'}, {'startNode': 'emily davis', 'endNode': 'time management', 'name': 'has skill'}]}\n" - ] - } - ], + "outputs": [], "source": [ "global_ent, global_rel = itext2kg.build_graph(sections=[semantic_blocks_cv], ent_threshold=0.6, rel_threshold=0.6)" ] }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "We construct the second graph, noting that we already have existing entities and relationships." - ] - }, { "cell_type": "code", - "execution_count": 19, + "execution_count": 15, "metadata": {}, "outputs": [ { @@ -450,30 +432,26 @@ "output_type": "stream", "text": [ "[INFO] Extracting Entities from the Document 1\n", - "{'entities': [{'label': 'Job Offer Title', 'name': 'Graphic Designer'}, {'label': 'Company', 'name': 'FICTITIOUS COMPANY'}, {'label': 'Job Type', 'name': 'Freelance contract possibility'}, {'label': 'Responsibility', 'name': 'Translate creative direction into high-quality silhouettes using Photoshop'}, {'label': 'Responsibility', 'name': 'Work on a wide range of projects to visualize and develop graphic designs that meet each brief'}, {'label': 'Responsibility', 'name': 'Work independently as well as in collaboration with the studio team to meet deadlines, potentially handling five or more projects simultaneously'}, {'label': 'Responsibility', 'name': 'Develop color schemes and renderings in Photoshop, categorized by themes, subjects, etc.'}, {'label': 'Qualification', 'name': 'Bachelor’s degree (Bac+3/5) in Graphic Design or Art'}, {'label': 'Qualification', 'name': \"3 years of experience in similar roles within a luxury brand's studio\"}, {'label': 'Qualification', 'name': 'Proficiency in Adobe Suite, including Illustrator, InDesign, Photoshop'}, {'label': 'Qualification', 'name': 'Excellent communication and presentation skills'}, {'label': 'Qualification', 'name': 'Strong organizational and time management skills to meet deadlines in a fast-paced environment'}, {'label': 'Qualification', 'name': 'Good understanding of the design process'}, {'label': 'Experience Required', 'name': '3 years'}]}\n", + "{'entities': [{'label': 'Person', 'name': 'Emily Davis'}, {'label': 'Contact Information', 'name': '+1 567 890 1234'}, {'label': 'Summary', 'name': 'Creative and passionate graphic designer with a keen eye for aesthetics and visual storytelling. Experienced in creating compelling designs for various media, including print and digital platforms.'}, {'label': 'Job Title', 'name': 'Senior Graphic Designer'}, {'label': 'Company', 'name': 'MNO Creative'}, {'label': 'Location', 'name': 'Boston, MA'}, {'label': 'Start Date', 'name': 'June 2017'}, {'label': 'End Date', 'name': 'Present'}, {'label': 'Responsibility', 'name': 'Designed logos, brochures, and social media graphics.'}, {'label': 'Responsibility', 'name': 'Collaborated with clients to understand their vision and deliver high-quality designs.'}, {'label': 'Responsibility', 'name': 'Managed multiple projects simultaneously.'}, {'label': 'Degree', 'name': 'Bachelor of Fine Arts in Graphic Design'}, {'label': 'Institution', 'name': 'Rhode Island School of Design'}, {'label': 'End Date', 'name': 'May 2017'}, {'label': 'Skill', 'name': 'Adobe Creative Suite (Photoshop, Illustrator, InDesign)'}, {'label': 'Skill', 'name': 'Sketch'}, {'label': 'Skill', 'name': 'Figma'}, {'label': 'Skill', 'name': 'Creativity'}, {'label': 'Skill', 'name': 'communication'}, {'label': 'Skill', 'name': 'time management'}, {'label': 'Certification', 'name': 'Adobe Certified Expert'}, {'label': 'Certification', 'name': 'UX Design Certification by Nielsen Norman Group'}]}\n", "[INFO] Extracting Relations from the Document 1\n", - "{'relationships': [{'startNode': 'graphic designer', 'endNode': 'fictitious company', 'name': 'works for'}, {'startNode': 'graphic designer', 'endNode': 'freelance contract possibility', 'name': 'has'}, {'startNode': 'graphic designer', 'endNode': 'translate creative direction into high quality silhouettes using photoshop', 'name': 'responsible for'}, {'startNode': 'graphic designer', 'endNode': 'work on a wide range of projects to visualize and develop graphic designs that meet each brief', 'name': 'responsible for'}, {'startNode': 'graphic designer', 'endNode': 'work independently as well as in collaboration with the studio team to meet deadlines, potentially handling five or more projects simultaneously', 'name': 'responsible for'}, {'startNode': 'graphic designer', 'endNode': 'develop color schemes and renderings in photoshop, categorized by themes, subjects, etc.', 'name': 'responsible for'}, {'startNode': 'graphic designer', 'endNode': 'bachelor’s degree (bac+3/5) in graphic design or art', 'name': 'requires'}, {'startNode': 'graphic designer', 'endNode': \"3 years of experience in similar roles within a luxury brand's studio\", 'name': 'requires'}, {'startNode': 'graphic designer', 'endNode': 'proficiency in adobe suite, including illustrator, indesign, photoshop', 'name': 'requires'}, {'startNode': 'graphic designer', 'endNode': 'excellent communication and presentation skills', 'name': 'requires'}, {'startNode': 'graphic designer', 'endNode': 'strong organizational and time management skills to meet deadlines in a fast paced environment', 'name': 'requires'}, {'startNode': 'graphic designer', 'endNode': 'good understanding of the design process', 'name': 'requires'}, {'startNode': 'graphic designer', 'endNode': '3 years', 'name': 'experience required'}]}\n", - "[INFO] Matching the Document 1 Entities and Relationships with the Existing Global Entities/Relations\n", - "[INFO] Wohoo ! Entity using embeddings is matched --- bachelor’s degree (bac+3/5) in graphic design or art -merged--> bachelor of fine arts in graphic design \n", - "[INFO] Wohoo ! Entity using embeddings is matched --- proficiency in adobe suite, including illustrator, indesign, photoshop -merged--> adobe creative suite (photoshop, illustrator, indesign) \n", - "[INFO] Wohoo ! Relation using embeddings is matched --- works for -merged--> works_at \n" + "{'relationships': [{'startNode': 'emily davis', 'endNode': '+1 567 890 1234', 'name': 'has phone number'}, {'startNode': 'emily davis', 'endNode': 'creative and passionate graphic designer with a keen eye for aesthetics and visual storytelling. experienced in creating compelling designs for various media, including print and digital platforms.', 'name': 'has summary'}, {'startNode': 'emily davis', 'endNode': 'senior graphic designer', 'name': 'holds position'}, {'startNode': 'senior graphic designer', 'endNode': 'mno creative', 'name': 'at company'}, {'startNode': 'mno creative', 'endNode': 'boston, ma', 'name': 'located in'}, {'startNode': 'senior graphic designer', 'endNode': 'june 2017', 'name': 'start date'}, {'startNode': 'senior graphic designer', 'endNode': 'present', 'name': 'end date'}, {'startNode': 'senior graphic designer', 'endNode': 'designed logos, brochures, and social media graphics.', 'name': 'responsibility'}, {'startNode': 'senior graphic designer', 'endNode': 'collaborated with clients to understand their vision and deliver high quality designs.', 'name': 'responsibility'}, {'startNode': 'senior graphic designer', 'endNode': 'managed multiple projects simultaneously.', 'name': 'responsibility'}, {'startNode': 'emily davis', 'endNode': 'bachelor of fine arts in graphic design', 'name': 'has degree'}, {'startNode': 'bachelor of fine arts in graphic design', 'endNode': 'rhode island school of design', 'name': 'from institution'}, {'startNode': 'bachelor of fine arts in graphic design', 'endNode': 'may 2017', 'name': 'end date'}, {'startNode': 'emily davis', 'endNode': 'adobe creative suite (photoshop, illustrator, indesign)', 'name': 'has skill'}, {'startNode': 'emily davis', 'endNode': 'sketch', 'name': 'has skill'}, {'startNode': 'emily davis', 'endNode': 'figma', 'name': 'has skill'}, {'startNode': 'emily davis', 'endNode': 'creativity', 'name': 'has skill'}, {'startNode': 'emily davis', 'endNode': 'communication', 'name': 'has skill'}, {'startNode': 'emily davis', 'endNode': 'time management', 'name': 'has skill'}, {'startNode': 'emily davis', 'endNode': 'adobe certified expert', 'name': 'has certification'}, {'startNode': 'emily davis', 'endNode': 'ux design certification by nielsen norman group', 'name': 'has certification'}]}\n" ] } ], "source": [ - "global_ent_, global_rel_ = itext2kg.build_graph(sections=[semantic_blocks_job_offer], existing_global_entities = global_ent, existing_global_relationships = global_rel, ent_threshold=0.6, rel_threshold=0.6)" + "global_ent, global_rel = itext2kg.build_graph(sections=[semantic_blocks_cv], ent_threshold=0.6, rel_threshold=0.6)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "Same :)" + "We construct the second graph of the job offers, noting that we already have existing entities and relationships (of the CV)." ] }, { "cell_type": "code", - "execution_count": 20, + "execution_count": 16, "metadata": {}, "outputs": [ { @@ -481,23 +459,42 @@ "output_type": "stream", "text": [ "[INFO] Extracting Entities from the Document 1\n", - "{'entities': [{'label': 'Job Offer Title', 'name': 'Visual Designer'}, {'label': 'Company', 'name': 'Innovate Design Co.'}, {'label': 'Location', 'name': 'Paris'}, {'label': 'Location', 'name': 'London'}, {'label': 'Location', 'name': 'San Francisco'}, {'label': 'Job Type', 'name': 'full-time'}, {'label': 'Responsibility', 'name': 'Translate our core values, product, marketing, and sales objectives into beautifully crafted deliverables'}, {'label': 'Responsibility', 'name': 'Design compelling, brand-aligned digital and print materials, including websites, social media content, ads, third-party marketplaces, presentations, animations, events, prints, etc.'}, {'label': 'Responsibility', 'name': 'Develop and maintain visual brand identity guidelines, ensuring brand consistency across all media and multichannel platforms'}, {'label': 'Responsibility', 'name': \"Communicate Innovate Design Co.'s narrative through conversion and data-driven design\"}, {'label': 'Responsibility', 'name': 'Participate in brainstorming sessions and collaborate with stakeholders to articulate a creative vision that enhances our brand’s visual storytelling'}, {'label': 'Responsibility', 'name': 'Promote design comprehension and sensibility across the organization, refining work methodologies and design processes to enhance efficiency and effectiveness'}, {'label': 'Qualification', 'name': 'A Bachelor’s degree (or equivalent) in Graphic Design / Visual Arts - or a self-starter with a strong creative project track record'}, {'label': 'Qualification', 'name': '5-7 years of experience in Graphic Design, including brand design, 360° marketing and communications design, product brand design, 0-to-1 projects, front-end development, etc.'}, {'label': 'Qualification', 'name': 'Work experience within well-structured design departments operating in the tech/software space (including leading creative agencies, scale-ups, and mature tech companies)'}, {'label': 'Qualification', 'name': 'Proficiency in Figma, Adobe CC, print design best practices, and a solid understanding of web technologies (HTML, CSS, JS)'}, {'label': 'Qualification', 'name': 'A robust portfolio demonstrating a variety of design projects, showcasing creativity, originality, consistency, and attention to detail'}, {'label': 'Qualification', 'name': 'Perfectly fluent in English, both written and spoken'}, {'label': 'Qualification', 'name': 'Results-oriented, resourceful, innovative, intellectually curious, no-ego, proactive'}, {'label': 'Qualification', 'name': 'Highly collaborative and able to balance multiple projects and stakeholders'}, {'label': 'Qualification', 'name': 'Professional behavior with personal accountability, drive, and work ethics'}, {'label': 'Benefit', 'name': 'The ability to shape the exciting journey of technology and be part of the very early days of one of Europe’s hottest startups'}, {'label': 'Benefit', 'name': 'A fun, young, international, and multicultural team — based in Paris, London, and San Francisco'}, {'label': 'Benefit', 'name': 'Beautiful office space in the heart of Paris (Canal St Martin)'}, {'label': 'Benefit', 'name': 'Competitive salary and benefits package'}, {'label': 'Benefit', 'name': 'Opportunities for professional growth and development'}, {'label': 'Experience Required', 'name': '5-7 years'}]}\n", + "{'entities': [{'label': 'Job Title', 'name': 'Graphic Designer'}, {'label': 'Company', 'name': 'FICTITIOUS COMPANY'}, {'label': 'Job Type', 'name': 'Freelance'}, {'label': 'Responsibility', 'name': 'Translate creative direction into high-quality silhouettes using Photoshop'}, {'label': 'Responsibility', 'name': 'Work on a wide range of projects to visualize and develop graphic designs that meet each brief'}, {'label': 'Responsibility', 'name': 'Work independently as well as in collaboration with the studio team to meet deadlines, potentially handling five or more projects simultaneously'}, {'label': 'Responsibility', 'name': 'Develop color schemes and renderings in Photoshop, categorized by themes, subjects, etc.'}, {'label': 'Qualification', 'name': 'Bachelor’s degree (Bac+3/5) in Graphic Design or Art'}, {'label': 'Qualification', 'name': \"3 years of experience in similar roles within a luxury brand's studio\"}, {'label': 'Qualification', 'name': 'Proficiency in Adobe Suite, including Illustrator, InDesign, Photoshop'}, {'label': 'Qualification', 'name': 'Excellent communication and presentation skills'}, {'label': 'Qualification', 'name': 'Strong organizational and time management skills to meet deadlines in a fast-paced environment'}, {'label': 'Qualification', 'name': 'Good understanding of the design process'}, {'label': 'Experience Required', 'name': '3 years'}]}\n", "[INFO] Extracting Relations from the Document 1\n", - "{'relationships': [{'startNode': 'visual designer', 'endNode': 'innovate design co.', 'name': 'job_offer_title'}, {'startNode': 'innovate design co.', 'endNode': 'paris', 'name': 'location'}, {'startNode': 'innovate design co.', 'endNode': 'london', 'name': 'location'}, {'startNode': 'innovate design co.', 'endNode': 'san francisco', 'name': 'location'}, {'startNode': 'visual designer', 'endNode': 'full time', 'name': 'job_type'}, {'startNode': 'visual designer', 'endNode': 'translate our core values, product, marketing, and sales objectives into beautifully crafted deliverables', 'name': 'responsibility'}, {'startNode': 'visual designer', 'endNode': 'design compelling, brand aligned digital and print materials, including websites, social media content, ads, third party marketplaces, presentations, animations, events, prints, etc.', 'name': 'responsibility'}, {'startNode': 'visual designer', 'endNode': 'develop and maintain visual brand identity guidelines, ensuring brand consistency across all media and multichannel platforms', 'name': 'responsibility'}, {'startNode': 'visual designer', 'endNode': \"communicate innovate design co.'s narrative through conversion and data driven design\", 'name': 'responsibility'}, {'startNode': 'visual designer', 'endNode': 'participate in brainstorming sessions and collaborate with stakeholders to articulate a creative vision that enhances our brand’s visual storytelling', 'name': 'responsibility'}, {'startNode': 'visual designer', 'endNode': 'promote design comprehension and sensibility across the organization, refining work methodologies and design processes to enhance efficiency and effectiveness', 'name': 'responsibility'}, {'startNode': 'visual designer', 'endNode': 'a bachelor’s degree (or equivalent) in graphic design / visual arts or a self starter with a strong creative project track record', 'name': 'qualification'}, {'startNode': 'visual designer', 'endNode': '5 7 years of experience in graphic design, including brand design, 360° marketing and communications design, product brand design, 0 to 1 projects, front end development, etc.', 'name': 'qualification'}, {'startNode': 'visual designer', 'endNode': 'work experience within well structured design departments operating in the tech/software space (including leading creative agencies, scale ups, and mature tech companies)', 'name': 'qualification'}, {'startNode': 'visual designer', 'endNode': 'proficiency in figma, adobe cc, print design best practices, and a solid understanding of web technologies (html, css, js)', 'name': 'qualification'}, {'startNode': 'visual designer', 'endNode': 'a robust portfolio demonstrating a variety of design projects, showcasing creativity, originality, consistency, and attention to detail', 'name': 'qualification'}, {'startNode': 'visual designer', 'endNode': 'perfectly fluent in english, both written and spoken', 'name': 'qualification'}, {'startNode': 'visual designer', 'endNode': 'results oriented, resourceful, innovative, intellectually curious, no ego, proactive', 'name': 'qualification'}, {'startNode': 'visual designer', 'endNode': 'highly collaborative and able to balance multiple projects and stakeholders', 'name': 'qualification'}, {'startNode': 'visual designer', 'endNode': 'professional behavior with personal accountability, drive, and work ethics', 'name': 'qualification'}, {'startNode': 'visual designer', 'endNode': 'the ability to shape the exciting journey of technology and be part of the very early days of one of europe’s hottest startups', 'name': 'benefit'}, {'startNode': 'visual designer', 'endNode': 'a fun, young, international, and multicultural team — based in paris, london, and san francisco', 'name': 'benefit'}, {'startNode': 'visual designer', 'endNode': 'beautiful office space in the heart of paris (canal st martin)', 'name': 'benefit'}, {'startNode': 'visual designer', 'endNode': 'competitive salary and benefits package', 'name': 'benefit'}, {'startNode': 'visual designer', 'endNode': 'opportunities for professional growth and development', 'name': 'benefit'}, {'startNode': 'visual designer', 'endNode': '5 7 years', 'name': 'experience_required'}]}\n", - "[INFO] Matching the Document 1 Entities and Relationships with the Existing Global Entities/Relations\n", + "{'relationships': [{'startNode': 'graphic designer', 'endNode': 'fictitious company', 'name': 'job_offer_from'}, {'startNode': 'graphic designer', 'endNode': 'freelance', 'name': 'job_type'}, {'startNode': 'graphic designer', 'endNode': 'translate creative direction into high quality silhouettes using photoshop', 'name': 'responsibility'}, {'startNode': 'graphic designer', 'endNode': 'work on a wide range of projects to visualize and develop graphic designs that meet each brief', 'name': 'responsibility'}, {'startNode': 'graphic designer', 'endNode': 'work independently as well as in collaboration with the studio team to meet deadlines, potentially handling five or more projects simultaneously', 'name': 'responsibility'}, {'startNode': 'graphic designer', 'endNode': 'develop color schemes and renderings in photoshop, categorized by themes, subjects, etc.', 'name': 'responsibility'}, {'startNode': 'graphic designer', 'endNode': 'bachelor’s degree (bac+3/5) in graphic design or art', 'name': 'qualification'}, {'startNode': 'graphic designer', 'endNode': \"3 years of experience in similar roles within a luxury brand's studio\", 'name': 'qualification'}, {'startNode': 'graphic designer', 'endNode': 'proficiency in adobe suite, including illustrator, indesign, photoshop', 'name': 'qualification'}, {'startNode': 'graphic designer', 'endNode': 'excellent communication and presentation skills', 'name': 'qualification'}, {'startNode': 'graphic designer', 'endNode': 'strong organizational and time management skills to meet deadlines in a fast paced environment', 'name': 'qualification'}, {'startNode': 'graphic designer', 'endNode': 'good understanding of the design process', 'name': 'qualification'}, {'startNode': 'graphic designer', 'endNode': '3 years', 'name': 'experience_required'}]}\n", + "[INFO] Extracting Entities from the Document 2\n", + "{'entities': [{'label': 'Job Offer Title', 'name': 'Visual Designer'}, {'label': 'Company', 'name': 'Innovate Design Co.'}, {'label': 'Location', 'name': 'Paris (Canal St Martin)'}, {'label': 'Responsibility', 'name': 'Translate our core values, product, marketing, and sales objectives into beautifully crafted deliverables'}, {'label': 'Responsibility', 'name': 'Design compelling, brand-aligned digital and print materials, including websites, social media content, ads, third-party marketplaces, presentations, animations, events, prints, etc.'}, {'label': 'Responsibility', 'name': 'Develop and maintain visual brand identity guidelines, ensuring brand consistency across all media and multichannel platforms'}, {'label': 'Responsibility', 'name': \"Communicate Innovate Design Co.'s narrative through conversion and data-driven design\"}, {'label': 'Responsibility', 'name': 'Participate in brainstorming sessions and collaborate with stakeholders to articulate a creative vision that enhances our brand’s visual storytelling'}, {'label': 'Responsibility', 'name': 'Promote design comprehension and sensibility across the organization, refining work methodologies and design processes to enhance efficiency and effectiveness'}, {'label': 'Qualification', 'name': 'A Bachelor’s degree (or equivalent) in Graphic Design / Visual Arts - or a self-starter with a strong creative project track record'}, {'label': 'Qualification', 'name': '5-7 years of experience in Graphic Design, including brand design, 360° marketing and communications design, product brand design, 0-to-1 projects, front-end development, etc.'}, {'label': 'Qualification', 'name': 'Work experience within well-structured design departments operating in the tech/software space (including leading creative agencies, scale-ups, and mature tech companies)'}, {'label': 'Qualification', 'name': 'Proficiency in Figma, Adobe CC, print design best practices, and a solid understanding of web technologies (HTML, CSS, JS)'}, {'label': 'Qualification', 'name': 'A robust portfolio demonstrating a variety of design projects, showcasing creativity, originality, consistency, and attention to detail'}, {'label': 'Qualification', 'name': 'Perfectly fluent in English, both written and spoken'}, {'label': 'Qualification', 'name': 'Results-oriented, resourceful, innovative, intellectually curious, no-ego, proactive'}, {'label': 'Qualification', 'name': 'Highly collaborative and able to balance multiple projects and stakeholders'}, {'label': 'Qualification', 'name': 'Professional behavior with personal accountability, drive, and work ethics'}, {'label': 'Benefit', 'name': 'The ability to shape the exciting journey of technology and be part of the very early days of one of Europe’s hottest startups'}, {'label': 'Benefit', 'name': 'A fun, young, international, and multicultural team — based in Paris, London, and San Francisco'}, {'label': 'Benefit', 'name': 'Beautiful office space in the heart of Paris (Canal St Martin)'}, {'label': 'Benefit', 'name': 'Competitive salary and benefits package'}, {'label': 'Benefit', 'name': 'Opportunities for professional growth and development'}, {'label': 'Experience Required', 'name': '5-7 years'}]}\n", "[INFO] Wohoo ! Entity using embeddings is matched --- visual designer -merged--> graphic designer \n", - "[INFO] Wohoo ! Entity using embeddings is matched --- a bachelor’s degree (or equivalent) in graphic design / visual arts or a self starter with a strong creative project track record -merged--> bachelor of fine arts in graphic design \n", + "[INFO] Wohoo ! Entity using embeddings is matched --- a bachelor’s degree (or equivalent) in graphic design / visual arts or a self starter with a strong creative project track record -merged--> bachelor’s degree (bac+3/5) in graphic design or art \n", + "[INFO] Wohoo ! Entity using embeddings is matched --- proficiency in figma, adobe cc, print design best practices, and a solid understanding of web technologies (html, css, js) -merged--> proficiency in adobe suite, including illustrator, indesign, photoshop \n", "[INFO] Wohoo ! Entity using embeddings is matched --- highly collaborative and able to balance multiple projects and stakeholders -merged--> work independently as well as in collaboration with the studio team to meet deadlines, potentially handling five or more projects simultaneously \n", "[INFO] Wohoo ! Entity using embeddings is matched --- 5 7 years -merged--> 3 years \n", - "[INFO] Wohoo ! Relation using embeddings is matched --- location -merged--> located_in \n", - "[INFO] Wohoo ! Relation using embeddings is matched --- location -merged--> located_in \n", - "[INFO] Wohoo ! Relation using embeddings is matched --- location -merged--> located_in \n", - "[INFO] Wohoo ! Relation using embeddings is matched --- experience required -merged--> experience_required \n" + "[INFO] Extracting Relations from the Document 2\n", + "{'relationships': [{'startNode': 'innovate design co.', 'endNode': 'paris (canal st martin)', 'name': 'location'}, {'startNode': 'innovate design co.', 'endNode': 'translate our core values, product, marketing, and sales objectives into beautifully crafted deliverables', 'name': 'responsibility'}, {'startNode': 'innovate design co.', 'endNode': 'design compelling, brand aligned digital and print materials, including websites, social media content, ads, third party marketplaces, presentations, animations, events, prints, etc.', 'name': 'responsibility'}, {'startNode': 'innovate design co.', 'endNode': 'develop and maintain visual brand identity guidelines, ensuring brand consistency across all media and multichannel platforms', 'name': 'responsibility'}, {'startNode': 'innovate design co.', 'endNode': \"communicate innovate design co.'s narrative through conversion and data driven design\", 'name': 'responsibility'}, {'startNode': 'innovate design co.', 'endNode': 'participate in brainstorming sessions and collaborate with stakeholders to articulate a creative vision that enhances our brand’s visual storytelling', 'name': 'responsibility'}, {'startNode': 'innovate design co.', 'endNode': 'promote design comprehension and sensibility across the organization, refining work methodologies and design processes to enhance efficiency and effectiveness', 'name': 'responsibility'}, {'startNode': 'innovate design co.', 'endNode': 'bachelor’s degree (bac+3/5) in graphic design or art', 'name': 'qualification'}, {'startNode': 'innovate design co.', 'endNode': '5 7 years of experience in graphic design, including brand design, 360° marketing and communications design, product brand design, 0 to 1 projects, front end development, etc.', 'name': 'qualification'}, {'startNode': 'innovate design co.', 'endNode': 'work experience within well structured design departments operating in the tech/software space (including leading creative agencies, scale ups, and mature tech companies)', 'name': 'qualification'}, {'startNode': 'innovate design co.', 'endNode': 'proficiency in adobe suite, including illustrator, indesign, photoshop', 'name': 'qualification'}, {'startNode': 'innovate design co.', 'endNode': 'a robust portfolio demonstrating a variety of design projects, showcasing creativity, originality, consistency, and attention to detail', 'name': 'qualification'}, {'startNode': 'innovate design co.', 'endNode': 'perfectly fluent in english, both written and spoken', 'name': 'qualification'}, {'startNode': 'innovate design co.', 'endNode': 'results oriented, resourceful, innovative, intellectually curious, no ego, proactive', 'name': 'qualification'}, {'startNode': 'innovate design co.', 'endNode': 'work independently as well as in collaboration with the studio team to meet deadlines, potentially handling five or more projects simultaneously', 'name': 'qualification'}, {'startNode': 'innovate design co.', 'endNode': 'professional behavior with personal accountability, drive, and work ethics', 'name': 'qualification'}, {'startNode': 'innovate design co.', 'endNode': 'the ability to shape the exciting journey of technology and be part of the very early days of one of europe’s hottest startups', 'name': 'benefit'}, {'startNode': 'innovate design co.', 'endNode': 'a fun, young, international, and multicultural team — based in paris, london, and san francisco', 'name': 'benefit'}, {'startNode': 'innovate design co.', 'endNode': 'beautiful office space in the heart of paris (canal st martin)', 'name': 'benefit'}, {'startNode': 'innovate design co.', 'endNode': 'competitive salary and benefits package', 'name': 'benefit'}, {'startNode': 'innovate design co.', 'endNode': 'opportunities for professional growth and development', 'name': 'benefit'}]}\n", + "[INFO] The isolated entities are [{'label': 'Job Title', 'name': 'graphic designer', 'properties': {'embeddings': array([-0.00340874, 0.0221568 , -0.01656049, ..., -0.02892156,\n", + " 0.00204041, -0.0186602 ])}}, {'label': 'Experience Required', 'name': '3 years', 'properties': {'embeddings': array([-0.02898797, 0.00264016, -0.00359552, ..., 0.00157613,\n", + " 0.03738828, 0.01727401])}}]\n", + "Some isolated entities without relations were detected ... trying to solve them!\n", + "{'relationships': [{'startNode': 'graphic designer', 'endNode': '5 7 years of experience in graphic design, including brand design, 360° marketing and communications design, product brand design, 0 to 1 projects, front end development, etc.', 'name': 'requires'}, {'startNode': 'graphic designer', 'endNode': 'bachelor’s degree (bac+3/5) in graphic design or art', 'name': 'requires'}, {'startNode': 'graphic designer', 'endNode': 'proficiency in adobe suite, including illustrator, indesign, photoshop', 'name': 'requires'}, {'startNode': 'graphic designer', 'endNode': 'a robust portfolio demonstrating a variety of design projects, showcasing creativity, originality, consistency, and attention to detail', 'name': 'requires'}, {'startNode': 'graphic designer', 'endNode': 'perfectly fluent in english, both written and spoken', 'name': 'requires'}, {'startNode': 'graphic designer', 'endNode': 'results oriented, resourceful, innovative, intellectually curious, no ego, proactive', 'name': 'requires'}, {'startNode': 'graphic designer', 'endNode': 'work independently as well as in collaboration with the studio team to meet deadlines, potentially handling five or more projects simultaneously', 'name': 'requires'}, {'startNode': 'graphic designer', 'endNode': 'professional behavior with personal accountability, drive, and work ethics', 'name': 'requires'}, {'startNode': 'graphic designer', 'endNode': 'the ability to shape the exciting journey of technology and be part of the very early days of one of europe’s hottest startups', 'name': 'offers'}, {'startNode': 'graphic designer', 'endNode': 'a fun, young, international, and multicultural team — based in paris, london, and san francisco', 'name': 'offers'}, {'startNode': 'graphic designer', 'endNode': 'beautiful office space in the heart of paris (canal st martin)', 'name': 'offers'}, {'startNode': 'graphic designer', 'endNode': 'competitive salary and benefits package', 'name': 'offers'}, {'startNode': 'graphic designer', 'endNode': 'opportunities for professional growth and development', 'name': 'offers'}]}\n", + "[INFO] The isolated entities are [{'label': 'Experience Required', 'name': '3 years', 'properties': {'embeddings': array([-0.02898797, 0.00264016, -0.00359552, ..., 0.00157613,\n", + " 0.03738828, 0.01727401])}}]\n", + "Some isolated entities without relations were detected ... trying to solve them!\n", + "{'relationships': []}\n", + "[INFO] The isolated entities are [{'label': 'Experience Required', 'name': '3 years', 'properties': {'embeddings': array([-0.02898797, 0.00264016, -0.00359552, ..., 0.00157613,\n", + " 0.03738828, 0.01727401])}}]\n", + "Some isolated entities without relations were detected ... trying to solve them!\n", + "{'relationships': [{'startNode': 'bachelor’s degree (bac+3/5) in graphic design or art', 'endNode': '3 years', 'name': 'duration'}]}\n", + "[INFO] Matching the Document 1 Entities and Relationships with the Existing Global Entities/Relations\n", + "[INFO] Wohoo ! Entity using embeddings is matched --- graphic designer -merged--> senior graphic designer \n", + "[INFO] Wohoo ! Entity using embeddings is matched --- design compelling, brand aligned digital and print materials, including websites, social media content, ads, third party marketplaces, presentations, animations, events, prints, etc. -merged--> designed logos, brochures, and social media graphics. \n", + "[INFO] Wohoo ! Entity using embeddings is matched --- bachelor’s degree (bac+3/5) in graphic design or art -merged--> bachelor of fine arts in graphic design \n", + "[INFO] Wohoo ! Entity using embeddings is matched --- proficiency in adobe suite, including illustrator, indesign, photoshop -merged--> adobe creative suite (photoshop, illustrator, indesign) \n", + "[INFO] Wohoo ! Relation using embeddings is matched --- location -merged--> located_in \n" ] } ], "source": [ - "global_ent__, global_rel__ = itext2kg.build_graph(sections=[semantic_blocks_job_offer_2], existing_global_entities = global_ent_, existing_global_relationships = global_rel_, ent_threshold=0.6, rel_threshold=0.6)" + "global_ent_, global_rel_ = itext2kg.build_graph(sections=[semantic_blocks_job_offer, semantic_blocks_job_offer_2], existing_global_entities = global_ent, existing_global_relationships = global_rel, ent_threshold=0.6, rel_threshold=0.6)" ] }, { @@ -517,7 +514,7 @@ }, { "cell_type": "code", - "execution_count": 89, + "execution_count": 17, "metadata": {}, "outputs": [], "source": [ @@ -529,8 +526,8 @@ "PASSWORD = \"##\"\n", "\n", "new_graph = {}\n", - "new_graph[\"nodes\"] = global_ent__\n", - "new_graph[\"relationships\"] = global_rel__\n", + "new_graph[\"nodes\"] = global_ent_\n", + "new_graph[\"relationships\"] = global_rel_\n", "\n", "GraphIntegrator(uri=URI, username=USERNAME, password=PASSWORD).visualize_graph(json_graph=new_graph)" ]