// Seekers schema mapping - comprehensive natural language support import { createSchemaMapping } from "./base-mapping.js"; import fs from "node:fs"; const SCHEMA_PATH = "../smatchitObjectOdmdb/schema/seekers.json"; let seekersSchema = null; try { if (fs.existsSync(SCHEMA_PATH)) { seekersSchema = JSON.parse(fs.readFileSync(SCHEMA_PATH, "utf-8")); } } catch (error) { console.warn(`Warning: Could not load seekers schema: ${error.message}`); } export const seekersMapping = createSchemaMapping(seekersSchema, "seekers"); // Additional seeker-specific enhancements if (seekersMapping.available) { // Add seeker-specific synonym enhancements const seekerEnhancements = { // Work & Career "work experience": "seekworkingyear", "career experience": "seekworkingyear", "professional experience": "seekworkingyear", "years working": "seekworkingyear", "job experience": "seekjobtitleexperience", "previous jobs": "seekjobtitleexperience", "work history": "seekjobtitleexperience", "positions held": "seekjobtitleexperience", // Job Search Status urgency: "seekstatus", "how fast": "seekstatus", "job urgency": "seekstatus", "looking urgently": "seekstatus", "need job quickly": "seekstatus", // Compensation "expected salary": "salaryexpectation", "salary expectation": "salaryexpectation", "desired salary": "salaryexpectation", "target salary": "salaryexpectation", "pay expectation": "salaryexpectation", "wage expectation": "salaryexpectation", // Location preferences "work location": "seeklocation", "job location": "seeklocation", "where to work": "seeklocation", "preferred location": "seeklocation", "work geography": "seeklocation", // Skills & Abilities "technical skills": "skills", "professional skills": "skills", competencies: "skills", abilities: "skills", expertise: "skills", languages: "languageskills", "language abilities": "languageskills", "linguistic skills": "languageskills", // Personality & Profile "personality type": "mbti", "personality profile": "mbti", "MBTI type": "mbti", "psychological profile": "mbti", // Job Preferences "job type": "seekjobtype", "employment type": "seekjobtype", "contract type": "seekjobtype", "work type": "seekjobtype", // Availability & Schedule "working hours": "preferedworkinghours", "work schedule": "preferedworkinghours", "preferred hours": "preferedworkinghours", "schedule preference": "preferedworkinghours", "not available": "notavailabletowork", unavailable: "notavailabletowork", "blocked times": "notavailabletowork", // Job Search Activity "job applications": "jobadapply", "applied jobs": "jobadapply", "applications sent": "jobadapply", "bookmarked jobs": "jobadsaved", "saved jobs": "jobadsaved", "favorite jobs": "jobadsaved", "job invitations": "jobadinvitedtoapply", "invited to apply": "jobadinvitedtoapply", // Education & Training education: "educations", degree: "educations", qualifications: "educations", diploma: "educations", studies: "educations", // Communication preferences notifications: "notificationformatches", alerts: "notificationformatches", "email preferences": "emailactivityreportweekly", newsletter: "emailnewsletter", }; // Merge enhancements into synonyms Object.entries(seekerEnhancements).forEach(([synonym, fieldName]) => { seekersMapping.synonyms[synonym.toLowerCase()] = fieldName; }); // Add status value mappings seekersMapping.statusValues = { seekstatus: { urgent: "startasap", urgently: "startasap", asap: "startasap", quickly: "startasap", immediately: "startasap", fast: "startasap", "no rush": "norush", "taking time": "norush", leisurely: "norush", "not urgent": "norush", "not looking": "notlooking", "not active": "notlooking", inactive: "notlooking", }, }; } export default seekersMapping;