CoolFace
Apppublic

nqtruong/Job_Knowledge_Graph

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes
classNode.py43 linesDownload Raw Back to Knowledge_Graph
1from pydantic import BaseModel, Field, Extra2from typing import Dict, Any, List, Optional, Union3 4class Location(BaseModel):5    name: str = Field(description= "Location name")6    location_type: str | None = Field(description= "Type of location: headquater, office, etc; not a country, city.")7 8class Education(BaseModel):9    name: str = Field(description= "Degree name such as: Bachelor of Science, Master of Engineer, etc.")10    fields: str | None = Field(description= "Fields of study such as: Computer Science, Math, Information Technology, etc.")11    status: str | None = Field(description= "Education status: graduate, ungraduate, etc.")12 13class Skill(BaseModel):14    name: str = Field(description= "Skill name")15    hypernym: str | None = Field(description= "Hypernym of skill")16 17class Work_Exper(BaseModel):18    name: str = Field(description= "Work Experience name")19    duration: Any = Field(description= "Years or months or level of experience")20 21class Work_Level(BaseModel):22    name: str = Field(description= "Work level: intern, senior, lead, CEO, etc.")23 24class Company(BaseModel):25    subdiaries: List[str] | None = Field(description= "Subsidiaries or teams belong to the company. It not, if will not be returned.")26    locations: List[Location] | None = Field(description= "Company headquarter or branches. It not, if will not be returned.")27    industry: List[str] | None = Field(description= "The industry in which the company is doing business")28 29 30class Job(BaseModel, strict=True):31    description: str = Field(description="Brief summary of what to do when applying for this job.")32    work_at: Location | None = Field(description= "Working location. If not, it will not be returned")33    work_mode: str | None = Field(description= "Work at company (Onsite), Part-time, etc. If not, it will not be returned")34    work_level: Work_Level | None = Field(description= "Word level such as: Intern, Fresher, Junior, etc.")35    education_requirements: List[Education] = Field(description="Education requirements")36    skill_requirements: List[Skill] = Field(description= "Identify and list all the technology skills mentioned. These skills can be specific tools, frameworks, programming languages, or broader categories like 'cloud computing' or 'data science'.")37    work_exper_requirements: List[Work_Exper] = Field(description="Identify the specific years or months of experience required for each position or level of experience (e.g., entry-level, mid-level, senior). If the posting mentions preferred or desired experience, include that information as well.")38    benefit_compensation: str | None = Field(description= "Benefits and compensations include: salary, dayoff, holiday, etc.")39    from_company: Company = Field(description= "The company is recruiting for this job position")40 41 42class JobKnowledgeGraph(BaseModel):43    job: Job = Field(description= "Knowledge graph about job.")