From 723384bc9e1effbe59ed3d67593cd55ad353f278 Mon Sep 17 00:00:00 2001 From: Nile Dixon Date: Thu, 11 Jun 2026 22:39:43 -0500 Subject: [PATCH 1/6] feat: add JobBERT Job Norm Task remapped to ONET --- src/workrb/data/onet_30.json | 1018 ++++++++++++++++++++++ src/workrb/tasks/__init__.py | 2 + src/workrb/tasks/ranking/__init__.py | 2 + src/workrb/tasks/ranking/jobnorm_onet.py | 78 ++ tests/test_jobnorm_onet.py | 13 + 5 files changed, 1113 insertions(+) create mode 100644 src/workrb/data/onet_30.json create mode 100644 src/workrb/tasks/ranking/jobnorm_onet.py create mode 100644 tests/test_jobnorm_onet.py diff --git a/src/workrb/data/onet_30.json b/src/workrb/data/onet_30.json new file mode 100644 index 0000000..37bd324 --- /dev/null +++ b/src/workrb/data/onet_30.json @@ -0,0 +1,1018 @@ +[ + "Chief Executives", + "Chief Sustainability Officers", + "General and Operations Managers", + "Legislators", + "Advertising and Promotions Managers", + "Marketing Managers", + "Sales Managers", + "Public Relations Managers", + "Fundraising Managers", + "Administrative Services Managers", + "Facilities Managers", + "Security Managers", + "Computer and Information Systems Managers", + "Financial Managers", + "Treasurers and Controllers", + "Investment Fund Managers", + "Industrial Production Managers", + "Quality Control Systems Managers", + "Geothermal Production Managers", + "Biofuels Production Managers", + "Biomass Power Plant Managers", + "Hydroelectric Production Managers", + "Purchasing Managers", + "Transportation, Storage, and Distribution Managers", + "Supply Chain Managers", + "Compensation and Benefits Managers", + "Human Resources Managers", + "Training and Development Managers", + "Farmers, Ranchers, and Other Agricultural Managers", + "Construction Managers", + "Education and Childcare Administrators, Preschool and Daycare", + "Education Administrators, Kindergarten through Secondary", + "Education Administrators, Postsecondary", + "Education Administrators, All Other", + "Architectural and Engineering Managers", + "Biofuels/Biodiesel Technology and Product Development Managers", + "Food Service Managers", + "Gambling Managers", + "Entertainment and Recreation Managers, Except Gambling", + "Lodging Managers", + "Medical and Health Services Managers", + "Natural Sciences Managers", + "Clinical Research Coordinators", + "Water Resource Specialists", + "Postmasters and Mail Superintendents", + "Property, Real Estate, and Community Association Managers", + "Social and Community Service Managers", + "Emergency Management Directors", + "Funeral Home Managers", + "Personal Service Managers, All Other", + "Fitness and Wellness Coordinators", + "Spa Managers", + "Managers, All Other", + "Regulatory Affairs Managers", + "Compliance Managers", + "Loss Prevention Managers", + "Wind Energy Operations Managers", + "Wind Energy Development Managers", + "Brownfield Redevelopment Specialists and Site Managers", + "Agents and Business Managers of Artists, Performers, and Athletes", + "Buyers and Purchasing Agents, Farm Products", + "Wholesale and Retail Buyers, Except Farm Products", + "Purchasing Agents, Except Wholesale, Retail, and Farm Products", + "Claims Adjusters, Examiners, and Investigators", + "Insurance Appraisers, Auto Damage", + "Compliance Officers", + "Environmental Compliance Inspectors", + "Equal Opportunity Representatives and Officers", + "Government Property Inspectors and Investigators", + "Coroners", + "Regulatory Affairs Specialists", + "Customs Brokers", + "Cost Estimators", + "Human Resources Specialists", + "Farm Labor Contractors", + "Labor Relations Specialists", + "Logisticians", + "Logistics Engineers", + "Logistics Analysts", + "Project Management Specialists", + "Management Analysts", + "Meeting, Convention, and Event Planners", + "Fundraisers", + "Compensation, Benefits, and Job Analysis Specialists", + "Training and Development Specialists", + "Market Research Analysts and Marketing Specialists", + "Search Marketing Strategists", + "Business Operations Specialists, All Other", + "Business Continuity Planners", + "Sustainability Specialists", + "Online Merchants", + "Security Management Specialists", + "Accountants and Auditors", + "Appraisers of Personal and Business Property", + "Appraisers and Assessors of Real Estate", + "Budget Analysts", + "Credit Analysts", + "Financial and Investment Analysts", + "Personal Financial Advisors", + "Insurance Underwriters", + "Financial Risk Specialists", + "Financial Examiners", + "Credit Counselors", + "Loan Officers", + "Tax Examiners and Collectors, and Revenue Agents", + "Tax Preparers", + "Financial Specialists, All Other", + "Financial Quantitative Analysts", + "Fraud Examiners, Investigators and Analysts", + "Computer Systems Analysts", + "Health Informatics Specialists", + "Information Security Analysts", + "Computer and Information Research Scientists", + "Computer Network Support Specialists", + "Computer User Support Specialists", + "Computer Network Architects", + "Telecommunications Engineering Specialists", + "Database Administrators", + "Database Architects", + "Data Warehousing Specialists", + "Network and Computer Systems Administrators", + "Computer Programmers", + "Software Developers", + "Software Quality Assurance Analysts and Testers", + "Web Developers", + "Web and Digital Interface Designers", + "Video Game Designers", + "Computer Occupations, All Other", + "Web Administrators", + "Geographic Information Systems Technologists and Technicians", + "Document Management Specialists", + "Penetration Testers", + "Information Security Engineers", + "Digital Forensics Analysts", + "Blockchain Engineers", + "Computer Systems Engineers/Architects", + "Information Technology Project Managers", + "Actuaries", + "Mathematicians", + "Operations Research Analysts", + "Statisticians", + "Biostatisticians", + "Data Scientists", + "Business Intelligence Analysts", + "Clinical Data Managers", + "Mathematical Science Occupations, All Other", + "Bioinformatics Technicians", + "Architects, Except Landscape and Naval", + "Landscape Architects", + "Cartographers and Photogrammetrists", + "Surveyors", + "Geodetic Surveyors", + "Aerospace Engineers", + "Agricultural Engineers", + "Bioengineers and Biomedical Engineers", + "Chemical Engineers", + "Civil Engineers", + "Transportation Engineers", + "Water/Wastewater Engineers", + "Computer Hardware Engineers", + "Electrical Engineers", + "Electronics Engineers, Except Computer", + "Radio Frequency Identification Device Specialists", + "Environmental Engineers", + "Health and Safety Engineers, Except Mining Safety Engineers and Inspectors", + "Fire-Prevention and Protection Engineers", + "Industrial Engineers", + "Human Factors Engineers and Ergonomists", + "Validation Engineers", + "Manufacturing Engineers", + "Marine Engineers and Naval Architects", + "Materials Engineers", + "Mechanical Engineers", + "Fuel Cell Engineers", + "Automotive Engineers", + "Mining and Geological Engineers, Including Mining Safety Engineers", + "Nuclear Engineers", + "Petroleum Engineers", + "Engineers, All Other", + "Energy Engineers, Except Wind and Solar", + "Mechatronics Engineers", + "Microsystems Engineers", + "Photonics Engineers", + "Robotics Engineers", + "Nanosystems Engineers", + "Wind Energy Engineers", + "Solar Energy Systems Engineers", + "Architectural and Civil Drafters", + "Electrical and Electronics Drafters", + "Mechanical Drafters", + "Drafters, All Other", + "Aerospace Engineering and Operations Technologists and Technicians", + "Civil Engineering Technologists and Technicians", + "Electrical and Electronic Engineering Technologists and Technicians", + "Electro-Mechanical and Mechatronics Technologists and Technicians", + "Robotics Technicians", + "Environmental Engineering Technologists and Technicians", + "Industrial Engineering Technologists and Technicians", + "Nanotechnology Engineering Technologists and Technicians", + "Mechanical Engineering Technologists and Technicians", + "Automotive Engineering Technicians", + "Calibration Technologists and Technicians", + "Engineering Technologists and Technicians, Except Drafters, All Other", + "Non-Destructive Testing Specialists", + "Photonics Technicians", + "Surveying and Mapping Technicians", + "Animal Scientists", + "Food Scientists and Technologists", + "Soil and Plant Scientists", + "Biochemists and Biophysicists", + "Microbiologists", + "Zoologists and Wildlife Biologists", + "Biological Scientists, All Other", + "Bioinformatics Scientists", + "Molecular and Cellular Biologists", + "Geneticists", + "Biologists", + "Conservation Scientists", + "Range Managers", + "Park Naturalists", + "Foresters", + "Epidemiologists", + "Medical Scientists, Except Epidemiologists", + "Life Scientists, All Other", + "Astronomers", + "Physicists", + "Atmospheric and Space Scientists", + "Chemists", + "Materials Scientists", + "Environmental Scientists and Specialists, Including Health", + "Climate Change Policy Analysts", + "Environmental Restoration Planners", + "Industrial Ecologists", + "Geoscientists, Except Hydrologists and Geographers", + "Hydrologists", + "Physical Scientists, All Other", + "Remote Sensing Scientists and Technologists", + "Economists", + "Environmental Economists", + "Survey Researchers", + "Industrial-Organizational Psychologists", + "Clinical and Counseling Psychologists", + "School Psychologists", + "Psychologists, All Other", + "Neuropsychologists", + "Clinical Neuropsychologists", + "Sociologists", + "Urban and Regional Planners", + "Anthropologists and Archeologists", + "Geographers", + "Historians", + "Political Scientists", + "Social Scientists and Related Workers, All Other", + "Transportation Planners", + "Agricultural Technicians", + "Precision Agriculture Technicians", + "Food Science Technicians", + "Biological Technicians", + "Chemical Technicians", + "Environmental Science and Protection Technicians, Including Health", + "Geological Technicians, Except Hydrologic Technicians", + "Hydrologic Technicians", + "Nuclear Technicians", + "Nuclear Monitoring Technicians", + "Social Science Research Assistants", + "Forest and Conservation Technicians", + "Forensic Science Technicians", + "Life, Physical, and Social Science Technicians, All Other", + "Quality Control Analysts", + "Remote Sensing Technicians", + "Occupational Health and Safety Specialists", + "Occupational Health and Safety Technicians", + "Substance Abuse and Behavioral Disorder Counselors", + "Educational, Guidance, and Career Counselors and Advisors", + "Marriage and Family Therapists", + "Mental Health Counselors", + "Rehabilitation Counselors", + "Counselors, All Other", + "Child, Family, and School Social Workers", + "Healthcare Social Workers", + "Mental Health and Substance Abuse Social Workers", + "Social Workers, All Other", + "Health Education Specialists", + "Probation Officers and Correctional Treatment Specialists", + "Social and Human Service Assistants", + "Community Health Workers", + "Community and Social Service Specialists, All Other", + "Clergy", + "Directors, Religious Activities and Education", + "Religious Workers, All Other", + "Lawyers", + "Judicial Law Clerks", + "Administrative Law Judges, Adjudicators, and Hearing Officers", + "Arbitrators, Mediators, and Conciliators", + "Judges, Magistrate Judges, and Magistrates", + "Paralegals and Legal Assistants", + "Title Examiners, Abstractors, and Searchers", + "Legal Support Workers, All Other", + "Business Teachers, Postsecondary", + "Computer Science Teachers, Postsecondary", + "Mathematical Science Teachers, Postsecondary", + "Architecture Teachers, Postsecondary", + "Engineering Teachers, Postsecondary", + "Agricultural Sciences Teachers, Postsecondary", + "Biological Science Teachers, Postsecondary", + "Forestry and Conservation Science Teachers, Postsecondary", + "Atmospheric, Earth, Marine, and Space Sciences Teachers, Postsecondary", + "Chemistry Teachers, Postsecondary", + "Environmental Science Teachers, Postsecondary", + "Physics Teachers, Postsecondary", + "Anthropology and Archeology Teachers, Postsecondary", + "Area, Ethnic, and Cultural Studies Teachers, Postsecondary", + "Economics Teachers, Postsecondary", + "Geography Teachers, Postsecondary", + "Political Science Teachers, Postsecondary", + "Psychology Teachers, Postsecondary", + "Sociology Teachers, Postsecondary", + "Social Sciences Teachers, Postsecondary, All Other", + "Health Specialties Teachers, Postsecondary", + "Nursing Instructors and Teachers, Postsecondary", + "Education Teachers, Postsecondary", + "Library Science Teachers, Postsecondary", + "Criminal Justice and Law Enforcement Teachers, Postsecondary", + "Law Teachers, Postsecondary", + "Social Work Teachers, Postsecondary", + "Art, Drama, and Music Teachers, Postsecondary", + "Communications Teachers, Postsecondary", + "English Language and Literature Teachers, Postsecondary", + "Foreign Language and Literature Teachers, Postsecondary", + "History Teachers, Postsecondary", + "Philosophy and Religion Teachers, Postsecondary", + "Family and Consumer Sciences Teachers, Postsecondary", + "Recreation and Fitness Studies Teachers, Postsecondary", + "Career/Technical Education Teachers, Postsecondary", + "Postsecondary Teachers, All Other", + "Preschool Teachers, Except Special Education", + "Kindergarten Teachers, Except Special Education", + "Elementary School Teachers, Except Special Education", + "Middle School Teachers, Except Special and Career/Technical Education", + "Career/Technical Education Teachers, Middle School", + "Secondary School Teachers, Except Special and Career/Technical Education", + "Career/Technical Education Teachers, Secondary School", + "Special Education Teachers, Preschool", + "Special Education Teachers, Kindergarten", + "Special Education Teachers, Elementary School", + "Special Education Teachers, Middle School", + "Special Education Teachers, Secondary School", + "Special Education Teachers, All Other", + "Adapted Physical Education Specialists", + "Adult Basic Education, Adult Secondary Education, and English as a Second Language Instructors", + "Self-Enrichment Teachers", + "Substitute Teachers, Short-Term", + "Tutors", + "Teachers and Instructors, All Other", + "Archivists", + "Curators", + "Museum Technicians and Conservators", + "Librarians and Media Collections Specialists", + "Library Technicians", + "Farm and Home Management Educators", + "Instructional Coordinators", + "Teaching Assistants, Preschool, Elementary, Middle, and Secondary School, Except Special Education", + "Teaching Assistants, Special Education", + "Teaching Assistants, Postsecondary", + "Teaching Assistants, All Other", + "Educational Instruction and Library Workers, All Other", + "Art Directors", + "Craft Artists", + "Fine Artists, Including Painters, Sculptors, and Illustrators", + "Special Effects Artists and Animators", + "Artists and Related Workers, All Other", + "Commercial and Industrial Designers", + "Fashion Designers", + "Floral Designers", + "Graphic Designers", + "Interior Designers", + "Merchandise Displayers and Window Trimmers", + "Set and Exhibit Designers", + "Designers, All Other", + "Actors", + "Producers and Directors", + "Media Programming Directors", + "Talent Directors", + "Media Technical Directors/Managers", + "Athletes and Sports Competitors", + "Coaches and Scouts", + "Umpires, Referees, and Other Sports Officials", + "Dancers", + "Choreographers", + "Music Directors and Composers", + "Musicians and Singers", + "Disc Jockeys, Except Radio", + "Entertainers and Performers, Sports and Related Workers, All Other", + "Broadcast Announcers and Radio Disc Jockeys", + "News Analysts, Reporters, and Journalists", + "Public Relations Specialists", + "Editors", + "Technical Writers", + "Writers and Authors", + "Poets, Lyricists and Creative Writers", + "Interpreters and Translators", + "Court Reporters and Simultaneous Captioners", + "Media and Communication Workers, All Other", + "Audio and Video Technicians", + "Broadcast Technicians", + "Sound Engineering Technicians", + "Lighting Technicians", + "Photographers", + "Camera Operators, Television, Video, and Film", + "Film and Video Editors", + "Media and Communication Equipment Workers, All Other", + "Chiropractors", + "Dentists, General", + "Oral and Maxillofacial Surgeons", + "Orthodontists", + "Prosthodontists", + "Dentists, All Other Specialists", + "Dietitians and Nutritionists", + "Optometrists", + "Pharmacists", + "Physician Assistants", + "Anesthesiologist Assistants", + "Podiatrists", + "Occupational Therapists", + "Low Vision Therapists, Orientation and Mobility Specialists, and Vision Rehabilitation Therapists", + "Physical Therapists", + "Radiation Therapists", + "Recreational Therapists", + "Respiratory Therapists", + "Speech-Language Pathologists", + "Exercise Physiologists", + "Therapists, All Other", + "Art Therapists", + "Music Therapists", + "Veterinarians", + "Registered Nurses", + "Acute Care Nurses", + "Advanced Practice Psychiatric Nurses", + "Critical Care Nurses", + "Clinical Nurse Specialists", + "Nurse Anesthetists", + "Nurse Midwives", + "Nurse Practitioners", + "Audiologists", + "Anesthesiologists", + "Cardiologists", + "Dermatologists", + "Emergency Medicine Physicians", + "Family Medicine Physicians", + "General Internal Medicine Physicians", + "Neurologists", + "Obstetricians and Gynecologists", + "Pediatricians, General", + "Physicians, Pathologists", + "Psychiatrists", + "Radiologists", + "Physicians, All Other", + "Allergists and Immunologists", + "Hospitalists", + "Urologists", + "Physical Medicine and Rehabilitation Physicians", + "Preventive Medicine Physicians", + "Sports Medicine Physicians", + "Ophthalmologists, Except Pediatric", + "Orthopedic Surgeons, Except Pediatric", + "Pediatric Surgeons", + "Surgeons, All Other", + "Acupuncturists", + "Dental Hygienists", + "Healthcare Diagnosing or Treating Practitioners, All Other", + "Naturopathic Physicians", + "Orthoptists", + "Medical and Clinical Laboratory Technologists", + "Cytogenetic Technologists", + "Cytotechnologists", + "Histotechnologists", + "Medical and Clinical Laboratory Technicians", + "Histology Technicians", + "Cardiovascular Technologists and Technicians", + "Diagnostic Medical Sonographers", + "Nuclear Medicine Technologists", + "Radiologic Technologists and Technicians", + "Magnetic Resonance Imaging Technologists", + "Medical Dosimetrists", + "Emergency Medical Technicians", + "Paramedics", + "Dietetic Technicians", + "Pharmacy Technicians", + "Psychiatric Technicians", + "Surgical Technologists", + "Veterinary Technologists and Technicians", + "Ophthalmic Medical Technicians", + "Licensed Practical and Licensed Vocational Nurses", + "Medical Records Specialists", + "Opticians, Dispensing", + "Orthotists and Prosthetists", + "Hearing Aid Specialists", + "Health Technologists and Technicians, All Other", + "Neurodiagnostic Technologists", + "Ophthalmic Medical Technologists", + "Patient Representatives", + "Health Information Technologists and Medical Registrars", + "Athletic Trainers", + "Genetic Counselors", + "Surgical Assistants", + "Healthcare Practitioners and Technical Workers, All Other", + "Midwives", + "Home Health Aides", + "Personal Care Aides", + "Nursing Assistants", + "Orderlies", + "Psychiatric Aides", + "Occupational Therapy Assistants", + "Occupational Therapy Aides", + "Physical Therapist Assistants", + "Physical Therapist Aides", + "Massage Therapists", + "Dental Assistants", + "Medical Assistants", + "Medical Equipment Preparers", + "Medical Transcriptionists", + "Pharmacy Aides", + "Veterinary Assistants and Laboratory Animal Caretakers", + "Phlebotomists", + "Healthcare Support Workers, All Other", + "Speech-Language Pathology Assistants", + "Endoscopy Technicians", + "First-Line Supervisors of Correctional Officers", + "First-Line Supervisors of Police and Detectives", + "First-Line Supervisors of Firefighting and Prevention Workers", + "First-Line Supervisors of Security Workers", + "First-Line Supervisors of Protective Service Workers, All Other", + "Firefighters", + "Fire Inspectors and Investigators", + "Forest Fire Inspectors and Prevention Specialists", + "Bailiffs", + "Correctional Officers and Jailers", + "Detectives and Criminal Investigators", + "Police Identification and Records Officers", + "Intelligence Analysts", + "Fish and Game Wardens", + "Parking Enforcement Workers", + "Police and Sheriff's Patrol Officers", + "Customs and Border Protection Officers", + "Transit and Railroad Police", + "Animal Control Workers", + "Private Detectives and Investigators", + "Gambling Surveillance Officers and Gambling Investigators", + "Security Guards", + "Crossing Guards and Flaggers", + "Lifeguards, Ski Patrol, and Other Recreational Protective Service Workers", + "Transportation Security Screeners", + "School Bus Monitors", + "Protective Service Workers, All Other", + "Retail Loss Prevention Specialists", + "Chefs and Head Cooks", + "First-Line Supervisors of Food Preparation and Serving Workers", + "Cooks, Fast Food", + "Cooks, Institution and Cafeteria", + "Cooks, Private Household", + "Cooks, Restaurant", + "Cooks, Short Order", + "Cooks, All Other", + "Food Preparation Workers", + "Bartenders", + "Fast Food and Counter Workers", + "Baristas", + "Waiters and Waitresses", + "Food Servers, Nonrestaurant", + "Dining Room and Cafeteria Attendants and Bartender Helpers", + "Dishwashers", + "Hosts and Hostesses, Restaurant, Lounge, and Coffee Shop", + "Food Preparation and Serving Related Workers, All Other", + "First-Line Supervisors of Housekeeping and Janitorial Workers", + "First-Line Supervisors of Landscaping, Lawn Service, and Groundskeeping Workers", + "Janitors and Cleaners, Except Maids and Housekeeping Cleaners", + "Maids and Housekeeping Cleaners", + "Building Cleaning Workers, All Other", + "Pest Control Workers", + "Landscaping and Groundskeeping Workers", + "Pesticide Handlers, Sprayers, and Applicators, Vegetation", + "Tree Trimmers and Pruners", + "Grounds Maintenance Workers, All Other", + "First-Line Supervisors of Gambling Services Workers", + "First-Line Supervisors of Entertainment and Recreation Workers, Except Gambling Services", + "First-Line Supervisors of Personal Service Workers", + "Animal Trainers", + "Animal Caretakers", + "Gambling Dealers", + "Gambling and Sports Book Writers and Runners", + "Gambling Service Workers, All Other", + "Motion Picture Projectionists", + "Ushers, Lobby Attendants, and Ticket Takers", + "Amusement and Recreation Attendants", + "Costume Attendants", + "Locker Room, Coatroom, and Dressing Room Attendants", + "Entertainment Attendants and Related Workers, All Other", + "Embalmers", + "Crematory Operators", + "Funeral Attendants", + "Morticians, Undertakers, and Funeral Arrangers", + "Barbers", + "Hairdressers, Hairstylists, and Cosmetologists", + "Makeup Artists, Theatrical and Performance", + "Manicurists and Pedicurists", + "Shampooers", + "Skincare Specialists", + "Baggage Porters and Bellhops", + "Concierges", + "Tour Guides and Escorts", + "Travel Guides", + "Childcare Workers", + "Nannies", + "Exercise Trainers and Group Fitness Instructors", + "Recreation Workers", + "Residential Advisors", + "Personal Care and Service Workers, All Other", + "First-Line Supervisors of Retail Sales Workers", + "First-Line Supervisors of Non-Retail Sales Workers", + "Cashiers", + "Gambling Change Persons and Booth Cashiers", + "Counter and Rental Clerks", + "Parts Salespersons", + "Retail Salespersons", + "Advertising Sales Agents", + "Insurance Sales Agents", + "Securities, Commodities, and Financial Services Sales Agents", + "Travel Agents", + "Sales Representatives of Services, Except Advertising, Insurance, Financial Services, and Travel", + "Sales Representatives, Wholesale and Manufacturing, Technical and Scientific Products", + "Solar Sales Representatives and Assessors", + "Sales Representatives, Wholesale and Manufacturing, Except Technical and Scientific Products", + "Demonstrators and Product Promoters", + "Models", + "Real Estate Brokers", + "Real Estate Sales Agents", + "Sales Engineers", + "Telemarketers", + "Door-to-Door Sales Workers, News and Street Vendors, and Related Workers", + "Sales and Related Workers, All Other", + "First-Line Supervisors of Office and Administrative Support Workers", + "Switchboard Operators, Including Answering Service", + "Telephone Operators", + "Communications Equipment Operators, All Other", + "Bill and Account Collectors", + "Billing and Posting Clerks", + "Bookkeeping, Accounting, and Auditing Clerks", + "Gambling Cage Workers", + "Payroll and Timekeeping Clerks", + "Procurement Clerks", + "Tellers", + "Financial Clerks, All Other", + "Brokerage Clerks", + "Correspondence Clerks", + "Court, Municipal, and License Clerks", + "Credit Authorizers, Checkers, and Clerks", + "Customer Service Representatives", + "Eligibility Interviewers, Government Programs", + "File Clerks", + "Hotel, Motel, and Resort Desk Clerks", + "Interviewers, Except Eligibility and Loan", + "Library Assistants, Clerical", + "Loan Interviewers and Clerks", + "New Accounts Clerks", + "Order Clerks", + "Human Resources Assistants, Except Payroll and Timekeeping", + "Receptionists and Information Clerks", + "Reservation and Transportation Ticket Agents and Travel Clerks", + "Information and Record Clerks, All Other", + "Cargo and Freight Agents", + "Freight Forwarders", + "Couriers and Messengers", + "Public Safety Telecommunicators", + "Dispatchers, Except Police, Fire, and Ambulance", + "Meter Readers, Utilities", + "Postal Service Clerks", + "Postal Service Mail Carriers", + "Postal Service Mail Sorters, Processors, and Processing Machine Operators", + "Production, Planning, and Expediting Clerks", + "Shipping, Receiving, and Inventory Clerks", + "Weighers, Measurers, Checkers, and Samplers, Recordkeeping", + "Executive Secretaries and Executive Administrative Assistants", + "Legal Secretaries and Administrative Assistants", + "Medical Secretaries and Administrative Assistants", + "Secretaries and Administrative Assistants, Except Legal, Medical, and Executive", + "Data Entry Keyers", + "Word Processors and Typists", + "Desktop Publishers", + "Insurance Claims and Policy Processing Clerks", + "Mail Clerks and Mail Machine Operators, Except Postal Service", + "Office Clerks, General", + "Office Machine Operators, Except Computer", + "Proofreaders and Copy Markers", + "Statistical Assistants", + "Office and Administrative Support Workers, All Other", + "First-Line Supervisors of Farming, Fishing, and Forestry Workers", + "Agricultural Inspectors", + "Animal Breeders", + "Graders and Sorters, Agricultural Products", + "Agricultural Equipment Operators", + "Farmworkers and Laborers, Crop, Nursery, and Greenhouse", + "Farmworkers, Farm, Ranch, and Aquacultural Animals", + "Agricultural Workers, All Other", + "Fishing and Hunting Workers", + "Forest and Conservation Workers", + "Fallers", + "Logging Equipment Operators", + "Log Graders and Scalers", + "Logging Workers, All Other", + "First-Line Supervisors of Construction Trades and Extraction Workers", + "Solar Energy Installation Managers", + "Boilermakers", + "Brickmasons and Blockmasons", + "Stonemasons", + "Carpenters", + "Carpet Installers", + "Floor Layers, Except Carpet, Wood, and Hard Tiles", + "Floor Sanders and Finishers", + "Tile and Stone Setters", + "Cement Masons and Concrete Finishers", + "Terrazzo Workers and Finishers", + "Construction Laborers", + "Paving, Surfacing, and Tamping Equipment Operators", + "Pile Driver Operators", + "Operating Engineers and Other Construction Equipment Operators", + "Drywall and Ceiling Tile Installers", + "Tapers", + "Electricians", + "Glaziers", + "Insulation Workers, Floor, Ceiling, and Wall", + "Insulation Workers, Mechanical", + "Painters, Construction and Maintenance", + "Paperhangers", + "Pipelayers", + "Plumbers, Pipefitters, and Steamfitters", + "Solar Thermal Installers and Technicians", + "Plasterers and Stucco Masons", + "Reinforcing Iron and Rebar Workers", + "Roofers", + "Sheet Metal Workers", + "Structural Iron and Steel Workers", + "Solar Photovoltaic Installers", + "Helpers--Brickmasons, Blockmasons, Stonemasons, and Tile and Marble Setters", + "Helpers--Carpenters", + "Helpers--Electricians", + "Helpers--Painters, Paperhangers, Plasterers, and Stucco Masons", + "Helpers--Pipelayers, Plumbers, Pipefitters, and Steamfitters", + "Helpers--Roofers", + "Helpers, Construction Trades, All Other", + "Construction and Building Inspectors", + "Energy Auditors", + "Elevator and Escalator Installers and Repairers", + "Fence Erectors", + "Hazardous Materials Removal Workers", + "Highway Maintenance Workers", + "Rail-Track Laying and Maintenance Equipment Operators", + "Septic Tank Servicers and Sewer Pipe Cleaners", + "Segmental Pavers", + "Construction and Related Workers, All Other", + "Weatherization Installers and Technicians", + "Derrick Operators, Oil and Gas", + "Rotary Drill Operators, Oil and Gas", + "Service Unit Operators, Oil and Gas", + "Excavating and Loading Machine and Dragline Operators, Surface Mining", + "Earth Drillers, Except Oil and Gas", + "Explosives Workers, Ordnance Handling Experts, and Blasters", + "Continuous Mining Machine Operators", + "Roof Bolters, Mining", + "Loading and Moving Machine Operators, Underground Mining", + "Underground Mining Machine Operators, All Other", + "Rock Splitters, Quarry", + "Roustabouts, Oil and Gas", + "Helpers--Extraction Workers", + "Extraction Workers, All Other", + "First-Line Supervisors of Mechanics, Installers, and Repairers", + "Computer, Automated Teller, and Office Machine Repairers", + "Radio, Cellular, and Tower Equipment Installers and Repairers", + "Telecommunications Equipment Installers and Repairers, Except Line Installers", + "Avionics Technicians", + "Electric Motor, Power Tool, and Related Repairers", + "Electrical and Electronics Installers and Repairers, Transportation Equipment", + "Electrical and Electronics Repairers, Commercial and Industrial Equipment", + "Electrical and Electronics Repairers, Powerhouse, Substation, and Relay", + "Electronic Equipment Installers and Repairers, Motor Vehicles", + "Audiovisual Equipment Installers and Repairers", + "Security and Fire Alarm Systems Installers", + "Aircraft Mechanics and Service Technicians", + "Automotive Body and Related Repairers", + "Automotive Glass Installers and Repairers", + "Automotive Service Technicians and Mechanics", + "Bus and Truck Mechanics and Diesel Engine Specialists", + "Farm Equipment Mechanics and Service Technicians", + "Mobile Heavy Equipment Mechanics, Except Engines", + "Rail Car Repairers", + "Motorboat Mechanics and Service Technicians", + "Motorcycle Mechanics", + "Outdoor Power Equipment and Other Small Engine Mechanics", + "Bicycle Repairers", + "Recreational Vehicle Service Technicians", + "Tire Repairers and Changers", + "Mechanical Door Repairers", + "Control and Valve Installers and Repairers, Except Mechanical Door", + "Heating, Air Conditioning, and Refrigeration Mechanics and Installers", + "Home Appliance Repairers", + "Industrial Machinery Mechanics", + "Maintenance Workers, Machinery", + "Millwrights", + "Refractory Materials Repairers, Except Brickmasons", + "Electrical Power-Line Installers and Repairers", + "Telecommunications Line Installers and Repairers", + "Camera and Photographic Equipment Repairers", + "Medical Equipment Repairers", + "Musical Instrument Repairers and Tuners", + "Watch and Clock Repairers", + "Precision Instrument and Equipment Repairers, All Other", + "Maintenance and Repair Workers, General", + "Wind Turbine Service Technicians", + "Coin, Vending, and Amusement Machine Servicers and Repairers", + "Commercial Divers", + "Locksmiths and Safe Repairers", + "Manufactured Building and Mobile Home Installers", + "Riggers", + "Signal and Track Switch Repairers", + "Helpers--Installation, Maintenance, and Repair Workers", + "Installation, Maintenance, and Repair Workers, All Other", + "Geothermal Technicians", + "First-Line Supervisors of Production and Operating Workers", + "Aircraft Structure, Surfaces, Rigging, and Systems Assemblers", + "Coil Winders, Tapers, and Finishers", + "Electrical and Electronic Equipment Assemblers", + "Electromechanical Equipment Assemblers", + "Engine and Other Machine Assemblers", + "Structural Metal Fabricators and Fitters", + "Fiberglass Laminators and Fabricators", + "Timing Device Assemblers and Adjusters", + "Team Assemblers", + "Assemblers and Fabricators, All Other", + "Bakers", + "Butchers and Meat Cutters", + "Meat, Poultry, and Fish Cutters and Trimmers", + "Slaughterers and Meat Packers", + "Food and Tobacco Roasting, Baking, and Drying Machine Operators and Tenders", + "Food Batchmakers", + "Food Cooking Machine Operators and Tenders", + "Food Processing Workers, All Other", + "Extruding and Drawing Machine Setters, Operators, and Tenders, Metal and Plastic", + "Forging Machine Setters, Operators, and Tenders, Metal and Plastic", + "Rolling Machine Setters, Operators, and Tenders, Metal and Plastic", + "Cutting, Punching, and Press Machine Setters, Operators, and Tenders, Metal and Plastic", + "Drilling and Boring Machine Tool Setters, Operators, and Tenders, Metal and Plastic", + "Grinding, Lapping, Polishing, and Buffing Machine Tool Setters, Operators, and Tenders, Metal and Plastic", + "Lathe and Turning Machine Tool Setters, Operators, and Tenders, Metal and Plastic", + "Milling and Planing Machine Setters, Operators, and Tenders, Metal and Plastic", + "Machinists", + "Metal-Refining Furnace Operators and Tenders", + "Pourers and Casters, Metal", + "Model Makers, Metal and Plastic", + "Patternmakers, Metal and Plastic", + "Foundry Mold and Coremakers", + "Molding, Coremaking, and Casting Machine Setters, Operators, and Tenders, Metal and Plastic", + "Multiple Machine Tool Setters, Operators, and Tenders, Metal and Plastic", + "Tool and Die Makers", + "Welders, Cutters, Solderers, and Brazers", + "Welding, Soldering, and Brazing Machine Setters, Operators, and Tenders", + "Heat Treating Equipment Setters, Operators, and Tenders, Metal and Plastic", + "Layout Workers, Metal and Plastic", + "Plating Machine Setters, Operators, and Tenders, Metal and Plastic", + "Tool Grinders, Filers, and Sharpeners", + "Metal Workers and Plastic Workers, All Other", + "Prepress Technicians and Workers", + "Printing Press Operators", + "Print Binding and Finishing Workers", + "Laundry and Dry-Cleaning Workers", + "Pressers, Textile, Garment, and Related Materials", + "Sewing Machine Operators", + "Shoe and Leather Workers and Repairers", + "Shoe Machine Operators and Tenders", + "Sewers, Hand", + "Tailors, Dressmakers, and Custom Sewers", + "Textile Bleaching and Dyeing Machine Operators and Tenders", + "Textile Cutting Machine Setters, Operators, and Tenders", + "Textile Knitting and Weaving Machine Setters, Operators, and Tenders", + "Textile Winding, Twisting, and Drawing Out Machine Setters, Operators, and Tenders", + "Extruding and Forming Machine Setters, Operators, and Tenders, Synthetic and Glass Fibers", + "Fabric and Apparel Patternmakers", + "Upholsterers", + "Textile, Apparel, and Furnishings Workers, All Other", + "Cabinetmakers and Bench Carpenters", + "Furniture Finishers", + "Model Makers, Wood", + "Patternmakers, Wood", + "Sawing Machine Setters, Operators, and Tenders, Wood", + "Woodworking Machine Setters, Operators, and Tenders, Except Sawing", + "Woodworkers, All Other", + "Nuclear Power Reactor Operators", + "Power Distributors and Dispatchers", + "Power Plant Operators", + "Biomass Plant Technicians", + "Hydroelectric Plant Technicians", + "Stationary Engineers and Boiler Operators", + "Water and Wastewater Treatment Plant and System Operators", + "Chemical Plant and System Operators", + "Gas Plant Operators", + "Petroleum Pump System Operators, Refinery Operators, and Gaugers", + "Plant and System Operators, All Other", + "Biofuels Processing Technicians", + "Chemical Equipment Operators and Tenders", + "Separating, Filtering, Clarifying, Precipitating, and Still Machine Setters, Operators, and Tenders", + "Crushing, Grinding, and Polishing Machine Setters, Operators, and Tenders", + "Grinding and Polishing Workers, Hand", + "Mixing and Blending Machine Setters, Operators, and Tenders", + "Cutters and Trimmers, Hand", + "Cutting and Slicing Machine Setters, Operators, and Tenders", + "Extruding, Forming, Pressing, and Compacting Machine Setters, Operators, and Tenders", + "Furnace, Kiln, Oven, Drier, and Kettle Operators and Tenders", + "Inspectors, Testers, Sorters, Samplers, and Weighers", + "Jewelers and Precious Stone and Metal Workers", + "Gem and Diamond Workers", + "Dental Laboratory Technicians", + "Medical Appliance Technicians", + "Ophthalmic Laboratory Technicians", + "Packaging and Filling Machine Operators and Tenders", + "Painting, Coating, and Decorating Workers", + "Coating, Painting, and Spraying Machine Setters, Operators, and Tenders", + "Semiconductor Processing Technicians", + "Photographic Process Workers and Processing Machine Operators", + "Computer Numerically Controlled Tool Operators", + "Computer Numerically Controlled Tool Programmers", + "Adhesive Bonding Machine Operators and Tenders", + "Cleaning, Washing, and Metal Pickling Equipment Operators and Tenders", + "Cooling and Freezing Equipment Operators and Tenders", + "Etchers and Engravers", + "Molders, Shapers, and Casters, Except Metal and Plastic", + "Stone Cutters and Carvers, Manufacturing", + "Glass Blowers, Molders, Benders, and Finishers", + "Potters, Manufacturing", + "Paper Goods Machine Setters, Operators, and Tenders", + "Tire Builders", + "Helpers--Production Workers", + "Production Workers, All Other", + "Aircraft Cargo Handling Supervisors", + "First-Line Supervisors of Helpers, Laborers, and Material Movers, Hand", + "Recycling Coordinators", + "First-Line Supervisors of Material-Moving Machine and Vehicle Operators", + "First-Line Supervisors of Passenger Attendants", + "First-Line Supervisors of Transportation Workers, All Other", + "Airline Pilots, Copilots, and Flight Engineers", + "Commercial Pilots", + "Air Traffic Controllers", + "Airfield Operations Specialists", + "Flight Attendants", + "Ambulance Drivers and Attendants, Except Emergency Medical Technicians", + "Driver/Sales Workers", + "Heavy and Tractor-Trailer Truck Drivers", + "Light Truck Drivers", + "Bus Drivers, School", + "Bus Drivers, Transit and Intercity", + "Shuttle Drivers and Chauffeurs", + "Taxi Drivers", + "Motor Vehicle Operators, All Other", + "Locomotive Engineers", + "Rail Yard Engineers, Dinkey Operators, and Hostlers", + "Railroad Brake, Signal, and Switch Operators and Locomotive Firers", + "Railroad Conductors and Yardmasters", + "Subway and Streetcar Operators", + "Rail Transportation Workers, All Other", + "Sailors and Marine Oilers", + "Captains, Mates, and Pilots of Water Vessels", + "Motorboat Operators", + "Ship Engineers", + "Bridge and Lock Tenders", + "Parking Attendants", + "Automotive and Watercraft Service Attendants", + "Aircraft Service Attendants", + "Traffic Technicians", + "Transportation Inspectors", + "Aviation Inspectors", + "Transportation Vehicle, Equipment and Systems Inspectors, Except Aviation", + "Passenger Attendants", + "Transportation Workers, All Other", + "Conveyor Operators and Tenders", + "Crane and Tower Operators", + "Dredge Operators", + "Hoist and Winch Operators", + "Industrial Truck and Tractor Operators", + "Cleaners of Vehicles and Equipment", + "Laborers and Freight, Stock, and Material Movers, Hand", + "Recycling and Reclamation Workers", + "Machine Feeders and Offbearers", + "Packers and Packagers, Hand", + "Stockers and Order Fillers", + "Gas Compressor and Gas Pumping Station Operators", + "Pump Operators, Except Wellhead Pumpers", + "Wellhead Pumpers", + "Refuse and Recyclable Material Collectors", + "Tank Car, Truck, and Ship Loaders", + "Material Moving Workers, All Other", + "Air Crew Officers", + "Aircraft Launch and Recovery Officers", + "Armored Assault Vehicle Officers", + "Artillery and Missile Officers", + "Command and Control Center Officers", + "Infantry Officers", + "Special Forces Officers", + "Military Officer Special and Tactical Operations Leaders, All Other", + "First-Line Supervisors of Air Crew Members", + "First-Line Supervisors of Weapons Specialists/Crew Members", + "First-Line Supervisors of All Other Tactical Operations Specialists", + "Air Crew Members", + "Aircraft Launch and Recovery Specialists", + "Armored Assault Vehicle Crew Members", + "Artillery and Missile Crew Members", + "Command and Control Center Specialists", + "Infantry", + "Special Forces", + "Military Enlisted Tactical Operations and Air/Weapons Specialists and Crew Members, All Other" +] \ No newline at end of file diff --git a/src/workrb/tasks/__init__.py b/src/workrb/tasks/__init__.py index d008db6..d5dc5c8 100644 --- a/src/workrb/tasks/__init__.py +++ b/src/workrb/tasks/__init__.py @@ -15,6 +15,7 @@ from .ranking.job2skill import ESCOJob2SkillRanking from .ranking.job_similarity import JobTitleSimilarityRanking from .ranking.jobnorm import JobBERTJobNormRanking +from .ranking.jobnorm_onet import ONETJobNormRanking from .ranking.melo import MELORanking from .ranking.mels import MELSRanking from .ranking.skill2job import ESCOSkill2JobRanking @@ -63,4 +64,5 @@ "SkillMatch1kSkillSimilarityRanking", "ProjectCandidateRanking", "SearchQueryCandidateRanking", + "ONETJobNormRanking", ] diff --git a/src/workrb/tasks/ranking/__init__.py b/src/workrb/tasks/ranking/__init__.py index 876790f..10c6cfe 100644 --- a/src/workrb/tasks/ranking/__init__.py +++ b/src/workrb/tasks/ranking/__init__.py @@ -14,6 +14,7 @@ from workrb.tasks.ranking.job2skill import ESCOJob2SkillRanking from workrb.tasks.ranking.job_similarity import JobTitleSimilarityRanking from workrb.tasks.ranking.jobnorm import JobBERTJobNormRanking +from workrb.tasks.ranking.jobnorm_onet import ONETJobNormRanking from workrb.tasks.ranking.melo import MELORanking from workrb.tasks.ranking.mels import MELSRanking from workrb.tasks.ranking.skill2job import ESCOSkill2JobRanking @@ -42,6 +43,7 @@ "JobTitleSimilarityRanking", "MELORanking", "MELSRanking", + "ONETJobNormRanking", "ProjectCandidateRanking", "SearchQueryCandidateRanking", "SkillMatch1kSkillSimilarityRanking", diff --git a/src/workrb/tasks/ranking/jobnorm_onet.py b/src/workrb/tasks/ranking/jobnorm_onet.py new file mode 100644 index 0000000..37cccb2 --- /dev/null +++ b/src/workrb/tasks/ranking/jobnorm_onet.py @@ -0,0 +1,78 @@ +import json +from importlib import resources + +from datasets import load_dataset + +from workrb.registry import register_task +from workrb.tasks.abstract.base import DatasetSplit, LabelType, Language +from workrb.tasks.abstract.ranking_base import RankingDataset, RankingTask, RankingTaskGroup +from workrb.types import ModelInputType + +TARGET_SPACE = [] +with resources.open_text("workrb.data", "onet_30.json") as f: + TARGET_SPACE = json.load(f) + + +@register_task() +class ONETJobNormRanking(RankingTask): + @property + def name(self) -> str: + return "ONET Job Title Normalization" + + @property + def description(self) -> str: + return "Normalize job titles to canonical O*NET occupation groups" + + @property + def task_group(self) -> RankingTaskGroup: + return RankingTaskGroup.JOB_NORMALIZATION + + @property + def supported_query_languages(self) -> list[Language]: + return [Language.EN] + + @property + def supported_target_languages(self) -> list[Language]: + return [Language.EN] + + @property + def label_type(self) -> LabelType: + return LabelType.SINGLE_LABEL + + @property + def query_input_type(self) -> ModelInputType: + return ModelInputType.JOB_TITLE + + @property + def target_input_type(self) -> ModelInputType: + return ModelInputType.JOB_TITLE + + def load_dataset(self, dataset_id: str, split: DatasetSplit) -> RankingDataset: + """Load job normalization data for a specific split and dataset. + + Args: + dataset_id: Dataset identifier (language code for this task) + split: Dataset split to load + + Returns + ------- + RankingDataset object + """ + query_texts, target_indices = [], [] + + ds = load_dataset("workforcedeveloper/JobBERT-ONET-evaluation-dataset") + split_map = {split.VAL: "valid", split.TEST: "test"} + ds_split = ds[split_map[split]] + df = ds_split.to_pandas() + for index, row in df.iterrows(): + if row["onet_job_title"] in TARGET_SPACE: + query_texts.append(row["vacancy_job_title"]) + target_index = TARGET_SPACE.index(row["onet_job_title"]) + target_indices.append([target_index]) + + return RankingDataset( + query_texts=query_texts, + target_indices=target_indices, + target_space=TARGET_SPACE, + dataset_id=dataset_id, + ) diff --git a/tests/test_jobnorm_onet.py b/tests/test_jobnorm_onet.py new file mode 100644 index 0000000..0129ff4 --- /dev/null +++ b/tests/test_jobnorm_onet.py @@ -0,0 +1,13 @@ +import workrb +from workrb.tasks.abstract.base import Language + + +def test_my_custom_task_loads(): + """Test that task loads without errors""" + task = workrb.tasks.ONETJobNormRanking(split="val", languages=["en"]) + dataset_id = Language.EN.value + dataset = task.datasets[dataset_id] + + assert len(dataset.query_texts) > 0 + assert len(dataset.target_space) > 0 + assert len(dataset.target_indices) == len(dataset.query_texts) From aa53f601f23306d86416f15ed66b34d3ccf65fc0 Mon Sep 17 00:00:00 2001 From: Nile Dixon Date: Thu, 11 Jun 2026 22:49:25 -0500 Subject: [PATCH 2/6] feat: updating readme --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index b32e8cf..b242970 100644 --- a/README.md +++ b/README.md @@ -82,6 +82,7 @@ pip install workrb | Job to Skills WorkBench | `ESCOJob2SkillRanking` | multi_label | 3039 queries x 13939 targets | 28 | | Job Title Similarity | `JobTitleSimilarityRanking` | multi_label | 105 queries x 2619 targets | 11 | | Job Normalization | `JobBERTJobNormRanking` | single_label | 15463 queries x 2942 targets | 28 | +| Job Normalization (O*NET) | `ONETJobNormRanking` | single_label | 13615 queries x 1016 targets | 1 | | Job Normalization MELO | `MELORanking` | multi_label | 633 queries x 33813 targets | 21 | | Skill to Job WorkBench | `ESCOSkill2JobRanking` | multi_label | 13492 queries x 3039 targets | 28 | | Skill Extraction House | `HouseSkillExtractRanking` | multi_label | 262 queries x 13891 targets | 28 | From 03534ba3fc73eca9992f0b0fc8c1bfda1558361f Mon Sep 17 00:00:00 2001 From: blackmlengineer Date: Sat, 4 Jul 2026 17:17:36 -0500 Subject: [PATCH 3/6] feat: removing local JSON file and adding download function --- src/workrb/data/onet_30.json | 1018 ---------------------- src/workrb/tasks/__init__.py | 4 +- src/workrb/tasks/ranking/__init__.py | 4 +- src/workrb/tasks/ranking/jobnorm_onet.py | 74 +- 4 files changed, 68 insertions(+), 1032 deletions(-) delete mode 100644 src/workrb/data/onet_30.json diff --git a/src/workrb/data/onet_30.json b/src/workrb/data/onet_30.json deleted file mode 100644 index 37bd324..0000000 --- a/src/workrb/data/onet_30.json +++ /dev/null @@ -1,1018 +0,0 @@ -[ - "Chief Executives", - "Chief Sustainability Officers", - "General and Operations Managers", - "Legislators", - "Advertising and Promotions Managers", - "Marketing Managers", - "Sales Managers", - "Public Relations Managers", - "Fundraising Managers", - "Administrative Services Managers", - "Facilities Managers", - "Security Managers", - "Computer and Information Systems Managers", - "Financial Managers", - "Treasurers and Controllers", - "Investment Fund Managers", - "Industrial Production Managers", - "Quality Control Systems Managers", - "Geothermal Production Managers", - "Biofuels Production Managers", - "Biomass Power Plant Managers", - "Hydroelectric Production Managers", - "Purchasing Managers", - "Transportation, Storage, and Distribution Managers", - "Supply Chain Managers", - "Compensation and Benefits Managers", - "Human Resources Managers", - "Training and Development Managers", - "Farmers, Ranchers, and Other Agricultural Managers", - "Construction Managers", - "Education and Childcare Administrators, Preschool and Daycare", - "Education Administrators, Kindergarten through Secondary", - "Education Administrators, Postsecondary", - "Education Administrators, All Other", - "Architectural and Engineering Managers", - "Biofuels/Biodiesel Technology and Product Development Managers", - "Food Service Managers", - "Gambling Managers", - "Entertainment and Recreation Managers, Except Gambling", - "Lodging Managers", - "Medical and Health Services Managers", - "Natural Sciences Managers", - "Clinical Research Coordinators", - "Water Resource Specialists", - "Postmasters and Mail Superintendents", - "Property, Real Estate, and Community Association Managers", - "Social and Community Service Managers", - "Emergency Management Directors", - "Funeral Home Managers", - "Personal Service Managers, All Other", - "Fitness and Wellness Coordinators", - "Spa Managers", - "Managers, All Other", - "Regulatory Affairs Managers", - "Compliance Managers", - "Loss Prevention Managers", - "Wind Energy Operations Managers", - "Wind Energy Development Managers", - "Brownfield Redevelopment Specialists and Site Managers", - "Agents and Business Managers of Artists, Performers, and Athletes", - "Buyers and Purchasing Agents, Farm Products", - "Wholesale and Retail Buyers, Except Farm Products", - "Purchasing Agents, Except Wholesale, Retail, and Farm Products", - "Claims Adjusters, Examiners, and Investigators", - "Insurance Appraisers, Auto Damage", - "Compliance Officers", - "Environmental Compliance Inspectors", - "Equal Opportunity Representatives and Officers", - "Government Property Inspectors and Investigators", - "Coroners", - "Regulatory Affairs Specialists", - "Customs Brokers", - "Cost Estimators", - "Human Resources Specialists", - "Farm Labor Contractors", - "Labor Relations Specialists", - "Logisticians", - "Logistics Engineers", - "Logistics Analysts", - "Project Management Specialists", - "Management Analysts", - "Meeting, Convention, and Event Planners", - "Fundraisers", - "Compensation, Benefits, and Job Analysis Specialists", - "Training and Development Specialists", - "Market Research Analysts and Marketing Specialists", - "Search Marketing Strategists", - "Business Operations Specialists, All Other", - "Business Continuity Planners", - "Sustainability Specialists", - "Online Merchants", - "Security Management Specialists", - "Accountants and Auditors", - "Appraisers of Personal and Business Property", - "Appraisers and Assessors of Real Estate", - "Budget Analysts", - "Credit Analysts", - "Financial and Investment Analysts", - "Personal Financial Advisors", - "Insurance Underwriters", - "Financial Risk Specialists", - "Financial Examiners", - "Credit Counselors", - "Loan Officers", - "Tax Examiners and Collectors, and Revenue Agents", - "Tax Preparers", - "Financial Specialists, All Other", - "Financial Quantitative Analysts", - "Fraud Examiners, Investigators and Analysts", - "Computer Systems Analysts", - "Health Informatics Specialists", - "Information Security Analysts", - "Computer and Information Research Scientists", - "Computer Network Support Specialists", - "Computer User Support Specialists", - "Computer Network Architects", - "Telecommunications Engineering Specialists", - "Database Administrators", - "Database Architects", - "Data Warehousing Specialists", - "Network and Computer Systems Administrators", - "Computer Programmers", - "Software Developers", - "Software Quality Assurance Analysts and Testers", - "Web Developers", - "Web and Digital Interface Designers", - "Video Game Designers", - "Computer Occupations, All Other", - "Web Administrators", - "Geographic Information Systems Technologists and Technicians", - "Document Management Specialists", - "Penetration Testers", - "Information Security Engineers", - "Digital Forensics Analysts", - "Blockchain Engineers", - "Computer Systems Engineers/Architects", - "Information Technology Project Managers", - "Actuaries", - "Mathematicians", - "Operations Research Analysts", - "Statisticians", - "Biostatisticians", - "Data Scientists", - "Business Intelligence Analysts", - "Clinical Data Managers", - "Mathematical Science Occupations, All Other", - "Bioinformatics Technicians", - "Architects, Except Landscape and Naval", - "Landscape Architects", - "Cartographers and Photogrammetrists", - "Surveyors", - "Geodetic Surveyors", - "Aerospace Engineers", - "Agricultural Engineers", - "Bioengineers and Biomedical Engineers", - "Chemical Engineers", - "Civil Engineers", - "Transportation Engineers", - "Water/Wastewater Engineers", - "Computer Hardware Engineers", - "Electrical Engineers", - "Electronics Engineers, Except Computer", - "Radio Frequency Identification Device Specialists", - "Environmental Engineers", - "Health and Safety Engineers, Except Mining Safety Engineers and Inspectors", - "Fire-Prevention and Protection Engineers", - "Industrial Engineers", - "Human Factors Engineers and Ergonomists", - "Validation Engineers", - "Manufacturing Engineers", - "Marine Engineers and Naval Architects", - "Materials Engineers", - "Mechanical Engineers", - "Fuel Cell Engineers", - "Automotive Engineers", - "Mining and Geological Engineers, Including Mining Safety Engineers", - "Nuclear Engineers", - "Petroleum Engineers", - "Engineers, All Other", - "Energy Engineers, Except Wind and Solar", - "Mechatronics Engineers", - "Microsystems Engineers", - "Photonics Engineers", - "Robotics Engineers", - "Nanosystems Engineers", - "Wind Energy Engineers", - "Solar Energy Systems Engineers", - "Architectural and Civil Drafters", - "Electrical and Electronics Drafters", - "Mechanical Drafters", - "Drafters, All Other", - "Aerospace Engineering and Operations Technologists and Technicians", - "Civil Engineering Technologists and Technicians", - "Electrical and Electronic Engineering Technologists and Technicians", - "Electro-Mechanical and Mechatronics Technologists and Technicians", - "Robotics Technicians", - "Environmental Engineering Technologists and Technicians", - "Industrial Engineering Technologists and Technicians", - "Nanotechnology Engineering Technologists and Technicians", - "Mechanical Engineering Technologists and Technicians", - "Automotive Engineering Technicians", - "Calibration Technologists and Technicians", - "Engineering Technologists and Technicians, Except Drafters, All Other", - "Non-Destructive Testing Specialists", - "Photonics Technicians", - "Surveying and Mapping Technicians", - "Animal Scientists", - "Food Scientists and Technologists", - "Soil and Plant Scientists", - "Biochemists and Biophysicists", - "Microbiologists", - "Zoologists and Wildlife Biologists", - "Biological Scientists, All Other", - "Bioinformatics Scientists", - "Molecular and Cellular Biologists", - "Geneticists", - "Biologists", - "Conservation Scientists", - "Range Managers", - "Park Naturalists", - "Foresters", - "Epidemiologists", - "Medical Scientists, Except Epidemiologists", - "Life Scientists, All Other", - "Astronomers", - "Physicists", - "Atmospheric and Space Scientists", - "Chemists", - "Materials Scientists", - "Environmental Scientists and Specialists, Including Health", - "Climate Change Policy Analysts", - "Environmental Restoration Planners", - "Industrial Ecologists", - "Geoscientists, Except Hydrologists and Geographers", - "Hydrologists", - "Physical Scientists, All Other", - "Remote Sensing Scientists and Technologists", - "Economists", - "Environmental Economists", - "Survey Researchers", - "Industrial-Organizational Psychologists", - "Clinical and Counseling Psychologists", - "School Psychologists", - "Psychologists, All Other", - "Neuropsychologists", - "Clinical Neuropsychologists", - "Sociologists", - "Urban and Regional Planners", - "Anthropologists and Archeologists", - "Geographers", - "Historians", - "Political Scientists", - "Social Scientists and Related Workers, All Other", - "Transportation Planners", - "Agricultural Technicians", - "Precision Agriculture Technicians", - "Food Science Technicians", - "Biological Technicians", - "Chemical Technicians", - "Environmental Science and Protection Technicians, Including Health", - "Geological Technicians, Except Hydrologic Technicians", - "Hydrologic Technicians", - "Nuclear Technicians", - "Nuclear Monitoring Technicians", - "Social Science Research Assistants", - "Forest and Conservation Technicians", - "Forensic Science Technicians", - "Life, Physical, and Social Science Technicians, All Other", - "Quality Control Analysts", - "Remote Sensing Technicians", - "Occupational Health and Safety Specialists", - "Occupational Health and Safety Technicians", - "Substance Abuse and Behavioral Disorder Counselors", - "Educational, Guidance, and Career Counselors and Advisors", - "Marriage and Family Therapists", - "Mental Health Counselors", - "Rehabilitation Counselors", - "Counselors, All Other", - "Child, Family, and School Social Workers", - "Healthcare Social Workers", - "Mental Health and Substance Abuse Social Workers", - "Social Workers, All Other", - "Health Education Specialists", - "Probation Officers and Correctional Treatment Specialists", - "Social and Human Service Assistants", - "Community Health Workers", - "Community and Social Service Specialists, All Other", - "Clergy", - "Directors, Religious Activities and Education", - "Religious Workers, All Other", - "Lawyers", - "Judicial Law Clerks", - "Administrative Law Judges, Adjudicators, and Hearing Officers", - "Arbitrators, Mediators, and Conciliators", - "Judges, Magistrate Judges, and Magistrates", - "Paralegals and Legal Assistants", - "Title Examiners, Abstractors, and Searchers", - "Legal Support Workers, All Other", - "Business Teachers, Postsecondary", - "Computer Science Teachers, Postsecondary", - "Mathematical Science Teachers, Postsecondary", - "Architecture Teachers, Postsecondary", - "Engineering Teachers, Postsecondary", - "Agricultural Sciences Teachers, Postsecondary", - "Biological Science Teachers, Postsecondary", - "Forestry and Conservation Science Teachers, Postsecondary", - "Atmospheric, Earth, Marine, and Space Sciences Teachers, Postsecondary", - "Chemistry Teachers, Postsecondary", - "Environmental Science Teachers, Postsecondary", - "Physics Teachers, Postsecondary", - "Anthropology and Archeology Teachers, Postsecondary", - "Area, Ethnic, and Cultural Studies Teachers, Postsecondary", - "Economics Teachers, Postsecondary", - "Geography Teachers, Postsecondary", - "Political Science Teachers, Postsecondary", - "Psychology Teachers, Postsecondary", - "Sociology Teachers, Postsecondary", - "Social Sciences Teachers, Postsecondary, All Other", - "Health Specialties Teachers, Postsecondary", - "Nursing Instructors and Teachers, Postsecondary", - "Education Teachers, Postsecondary", - "Library Science Teachers, Postsecondary", - "Criminal Justice and Law Enforcement Teachers, Postsecondary", - "Law Teachers, Postsecondary", - "Social Work Teachers, Postsecondary", - "Art, Drama, and Music Teachers, Postsecondary", - "Communications Teachers, Postsecondary", - "English Language and Literature Teachers, Postsecondary", - "Foreign Language and Literature Teachers, Postsecondary", - "History Teachers, Postsecondary", - "Philosophy and Religion Teachers, Postsecondary", - "Family and Consumer Sciences Teachers, Postsecondary", - "Recreation and Fitness Studies Teachers, Postsecondary", - "Career/Technical Education Teachers, Postsecondary", - "Postsecondary Teachers, All Other", - "Preschool Teachers, Except Special Education", - "Kindergarten Teachers, Except Special Education", - "Elementary School Teachers, Except Special Education", - "Middle School Teachers, Except Special and Career/Technical Education", - "Career/Technical Education Teachers, Middle School", - "Secondary School Teachers, Except Special and Career/Technical Education", - "Career/Technical Education Teachers, Secondary School", - "Special Education Teachers, Preschool", - "Special Education Teachers, Kindergarten", - "Special Education Teachers, Elementary School", - "Special Education Teachers, Middle School", - "Special Education Teachers, Secondary School", - "Special Education Teachers, All Other", - "Adapted Physical Education Specialists", - "Adult Basic Education, Adult Secondary Education, and English as a Second Language Instructors", - "Self-Enrichment Teachers", - "Substitute Teachers, Short-Term", - "Tutors", - "Teachers and Instructors, All Other", - "Archivists", - "Curators", - "Museum Technicians and Conservators", - "Librarians and Media Collections Specialists", - "Library Technicians", - "Farm and Home Management Educators", - "Instructional Coordinators", - "Teaching Assistants, Preschool, Elementary, Middle, and Secondary School, Except Special Education", - "Teaching Assistants, Special Education", - "Teaching Assistants, Postsecondary", - "Teaching Assistants, All Other", - "Educational Instruction and Library Workers, All Other", - "Art Directors", - "Craft Artists", - "Fine Artists, Including Painters, Sculptors, and Illustrators", - "Special Effects Artists and Animators", - "Artists and Related Workers, All Other", - "Commercial and Industrial Designers", - "Fashion Designers", - "Floral Designers", - "Graphic Designers", - "Interior Designers", - "Merchandise Displayers and Window Trimmers", - "Set and Exhibit Designers", - "Designers, All Other", - "Actors", - "Producers and Directors", - "Media Programming Directors", - "Talent Directors", - "Media Technical Directors/Managers", - "Athletes and Sports Competitors", - "Coaches and Scouts", - "Umpires, Referees, and Other Sports Officials", - "Dancers", - "Choreographers", - "Music Directors and Composers", - "Musicians and Singers", - "Disc Jockeys, Except Radio", - "Entertainers and Performers, Sports and Related Workers, All Other", - "Broadcast Announcers and Radio Disc Jockeys", - "News Analysts, Reporters, and Journalists", - "Public Relations Specialists", - "Editors", - "Technical Writers", - "Writers and Authors", - "Poets, Lyricists and Creative Writers", - "Interpreters and Translators", - "Court Reporters and Simultaneous Captioners", - "Media and Communication Workers, All Other", - "Audio and Video Technicians", - "Broadcast Technicians", - "Sound Engineering Technicians", - "Lighting Technicians", - "Photographers", - "Camera Operators, Television, Video, and Film", - "Film and Video Editors", - "Media and Communication Equipment Workers, All Other", - "Chiropractors", - "Dentists, General", - "Oral and Maxillofacial Surgeons", - "Orthodontists", - "Prosthodontists", - "Dentists, All Other Specialists", - "Dietitians and Nutritionists", - "Optometrists", - "Pharmacists", - "Physician Assistants", - "Anesthesiologist Assistants", - "Podiatrists", - "Occupational Therapists", - "Low Vision Therapists, Orientation and Mobility Specialists, and Vision Rehabilitation Therapists", - "Physical Therapists", - "Radiation Therapists", - "Recreational Therapists", - "Respiratory Therapists", - "Speech-Language Pathologists", - "Exercise Physiologists", - "Therapists, All Other", - "Art Therapists", - "Music Therapists", - "Veterinarians", - "Registered Nurses", - "Acute Care Nurses", - "Advanced Practice Psychiatric Nurses", - "Critical Care Nurses", - "Clinical Nurse Specialists", - "Nurse Anesthetists", - "Nurse Midwives", - "Nurse Practitioners", - "Audiologists", - "Anesthesiologists", - "Cardiologists", - "Dermatologists", - "Emergency Medicine Physicians", - "Family Medicine Physicians", - "General Internal Medicine Physicians", - "Neurologists", - "Obstetricians and Gynecologists", - "Pediatricians, General", - "Physicians, Pathologists", - "Psychiatrists", - "Radiologists", - "Physicians, All Other", - "Allergists and Immunologists", - "Hospitalists", - "Urologists", - "Physical Medicine and Rehabilitation Physicians", - "Preventive Medicine Physicians", - "Sports Medicine Physicians", - "Ophthalmologists, Except Pediatric", - "Orthopedic Surgeons, Except Pediatric", - "Pediatric Surgeons", - "Surgeons, All Other", - "Acupuncturists", - "Dental Hygienists", - "Healthcare Diagnosing or Treating Practitioners, All Other", - "Naturopathic Physicians", - "Orthoptists", - "Medical and Clinical Laboratory Technologists", - "Cytogenetic Technologists", - "Cytotechnologists", - "Histotechnologists", - "Medical and Clinical Laboratory Technicians", - "Histology Technicians", - "Cardiovascular Technologists and Technicians", - "Diagnostic Medical Sonographers", - "Nuclear Medicine Technologists", - "Radiologic Technologists and Technicians", - "Magnetic Resonance Imaging Technologists", - "Medical Dosimetrists", - "Emergency Medical Technicians", - "Paramedics", - "Dietetic Technicians", - "Pharmacy Technicians", - "Psychiatric Technicians", - "Surgical Technologists", - "Veterinary Technologists and Technicians", - "Ophthalmic Medical Technicians", - "Licensed Practical and Licensed Vocational Nurses", - "Medical Records Specialists", - "Opticians, Dispensing", - "Orthotists and Prosthetists", - "Hearing Aid Specialists", - "Health Technologists and Technicians, All Other", - "Neurodiagnostic Technologists", - "Ophthalmic Medical Technologists", - "Patient Representatives", - "Health Information Technologists and Medical Registrars", - "Athletic Trainers", - "Genetic Counselors", - "Surgical Assistants", - "Healthcare Practitioners and Technical Workers, All Other", - "Midwives", - "Home Health Aides", - "Personal Care Aides", - "Nursing Assistants", - "Orderlies", - "Psychiatric Aides", - "Occupational Therapy Assistants", - "Occupational Therapy Aides", - "Physical Therapist Assistants", - "Physical Therapist Aides", - "Massage Therapists", - "Dental Assistants", - "Medical Assistants", - "Medical Equipment Preparers", - "Medical Transcriptionists", - "Pharmacy Aides", - "Veterinary Assistants and Laboratory Animal Caretakers", - "Phlebotomists", - "Healthcare Support Workers, All Other", - "Speech-Language Pathology Assistants", - "Endoscopy Technicians", - "First-Line Supervisors of Correctional Officers", - "First-Line Supervisors of Police and Detectives", - "First-Line Supervisors of Firefighting and Prevention Workers", - "First-Line Supervisors of Security Workers", - "First-Line Supervisors of Protective Service Workers, All Other", - "Firefighters", - "Fire Inspectors and Investigators", - "Forest Fire Inspectors and Prevention Specialists", - "Bailiffs", - "Correctional Officers and Jailers", - "Detectives and Criminal Investigators", - "Police Identification and Records Officers", - "Intelligence Analysts", - "Fish and Game Wardens", - "Parking Enforcement Workers", - "Police and Sheriff's Patrol Officers", - "Customs and Border Protection Officers", - "Transit and Railroad Police", - "Animal Control Workers", - "Private Detectives and Investigators", - "Gambling Surveillance Officers and Gambling Investigators", - "Security Guards", - "Crossing Guards and Flaggers", - "Lifeguards, Ski Patrol, and Other Recreational Protective Service Workers", - "Transportation Security Screeners", - "School Bus Monitors", - "Protective Service Workers, All Other", - "Retail Loss Prevention Specialists", - "Chefs and Head Cooks", - "First-Line Supervisors of Food Preparation and Serving Workers", - "Cooks, Fast Food", - "Cooks, Institution and Cafeteria", - "Cooks, Private Household", - "Cooks, Restaurant", - "Cooks, Short Order", - "Cooks, All Other", - "Food Preparation Workers", - "Bartenders", - "Fast Food and Counter Workers", - "Baristas", - "Waiters and Waitresses", - "Food Servers, Nonrestaurant", - "Dining Room and Cafeteria Attendants and Bartender Helpers", - "Dishwashers", - "Hosts and Hostesses, Restaurant, Lounge, and Coffee Shop", - "Food Preparation and Serving Related Workers, All Other", - "First-Line Supervisors of Housekeeping and Janitorial Workers", - "First-Line Supervisors of Landscaping, Lawn Service, and Groundskeeping Workers", - "Janitors and Cleaners, Except Maids and Housekeeping Cleaners", - "Maids and Housekeeping Cleaners", - "Building Cleaning Workers, All Other", - "Pest Control Workers", - "Landscaping and Groundskeeping Workers", - "Pesticide Handlers, Sprayers, and Applicators, Vegetation", - "Tree Trimmers and Pruners", - "Grounds Maintenance Workers, All Other", - "First-Line Supervisors of Gambling Services Workers", - "First-Line Supervisors of Entertainment and Recreation Workers, Except Gambling Services", - "First-Line Supervisors of Personal Service Workers", - "Animal Trainers", - "Animal Caretakers", - "Gambling Dealers", - "Gambling and Sports Book Writers and Runners", - "Gambling Service Workers, All Other", - "Motion Picture Projectionists", - "Ushers, Lobby Attendants, and Ticket Takers", - "Amusement and Recreation Attendants", - "Costume Attendants", - "Locker Room, Coatroom, and Dressing Room Attendants", - "Entertainment Attendants and Related Workers, All Other", - "Embalmers", - "Crematory Operators", - "Funeral Attendants", - "Morticians, Undertakers, and Funeral Arrangers", - "Barbers", - "Hairdressers, Hairstylists, and Cosmetologists", - "Makeup Artists, Theatrical and Performance", - "Manicurists and Pedicurists", - "Shampooers", - "Skincare Specialists", - "Baggage Porters and Bellhops", - "Concierges", - "Tour Guides and Escorts", - "Travel Guides", - "Childcare Workers", - "Nannies", - "Exercise Trainers and Group Fitness Instructors", - "Recreation Workers", - "Residential Advisors", - "Personal Care and Service Workers, All Other", - "First-Line Supervisors of Retail Sales Workers", - "First-Line Supervisors of Non-Retail Sales Workers", - "Cashiers", - "Gambling Change Persons and Booth Cashiers", - "Counter and Rental Clerks", - "Parts Salespersons", - "Retail Salespersons", - "Advertising Sales Agents", - "Insurance Sales Agents", - "Securities, Commodities, and Financial Services Sales Agents", - "Travel Agents", - "Sales Representatives of Services, Except Advertising, Insurance, Financial Services, and Travel", - "Sales Representatives, Wholesale and Manufacturing, Technical and Scientific Products", - "Solar Sales Representatives and Assessors", - "Sales Representatives, Wholesale and Manufacturing, Except Technical and Scientific Products", - "Demonstrators and Product Promoters", - "Models", - "Real Estate Brokers", - "Real Estate Sales Agents", - "Sales Engineers", - "Telemarketers", - "Door-to-Door Sales Workers, News and Street Vendors, and Related Workers", - "Sales and Related Workers, All Other", - "First-Line Supervisors of Office and Administrative Support Workers", - "Switchboard Operators, Including Answering Service", - "Telephone Operators", - "Communications Equipment Operators, All Other", - "Bill and Account Collectors", - "Billing and Posting Clerks", - "Bookkeeping, Accounting, and Auditing Clerks", - "Gambling Cage Workers", - "Payroll and Timekeeping Clerks", - "Procurement Clerks", - "Tellers", - "Financial Clerks, All Other", - "Brokerage Clerks", - "Correspondence Clerks", - "Court, Municipal, and License Clerks", - "Credit Authorizers, Checkers, and Clerks", - "Customer Service Representatives", - "Eligibility Interviewers, Government Programs", - "File Clerks", - "Hotel, Motel, and Resort Desk Clerks", - "Interviewers, Except Eligibility and Loan", - "Library Assistants, Clerical", - "Loan Interviewers and Clerks", - "New Accounts Clerks", - "Order Clerks", - "Human Resources Assistants, Except Payroll and Timekeeping", - "Receptionists and Information Clerks", - "Reservation and Transportation Ticket Agents and Travel Clerks", - "Information and Record Clerks, All Other", - "Cargo and Freight Agents", - "Freight Forwarders", - "Couriers and Messengers", - "Public Safety Telecommunicators", - "Dispatchers, Except Police, Fire, and Ambulance", - "Meter Readers, Utilities", - "Postal Service Clerks", - "Postal Service Mail Carriers", - "Postal Service Mail Sorters, Processors, and Processing Machine Operators", - "Production, Planning, and Expediting Clerks", - "Shipping, Receiving, and Inventory Clerks", - "Weighers, Measurers, Checkers, and Samplers, Recordkeeping", - "Executive Secretaries and Executive Administrative Assistants", - "Legal Secretaries and Administrative Assistants", - "Medical Secretaries and Administrative Assistants", - "Secretaries and Administrative Assistants, Except Legal, Medical, and Executive", - "Data Entry Keyers", - "Word Processors and Typists", - "Desktop Publishers", - "Insurance Claims and Policy Processing Clerks", - "Mail Clerks and Mail Machine Operators, Except Postal Service", - "Office Clerks, General", - "Office Machine Operators, Except Computer", - "Proofreaders and Copy Markers", - "Statistical Assistants", - "Office and Administrative Support Workers, All Other", - "First-Line Supervisors of Farming, Fishing, and Forestry Workers", - "Agricultural Inspectors", - "Animal Breeders", - "Graders and Sorters, Agricultural Products", - "Agricultural Equipment Operators", - "Farmworkers and Laborers, Crop, Nursery, and Greenhouse", - "Farmworkers, Farm, Ranch, and Aquacultural Animals", - "Agricultural Workers, All Other", - "Fishing and Hunting Workers", - "Forest and Conservation Workers", - "Fallers", - "Logging Equipment Operators", - "Log Graders and Scalers", - "Logging Workers, All Other", - "First-Line Supervisors of Construction Trades and Extraction Workers", - "Solar Energy Installation Managers", - "Boilermakers", - "Brickmasons and Blockmasons", - "Stonemasons", - "Carpenters", - "Carpet Installers", - "Floor Layers, Except Carpet, Wood, and Hard Tiles", - "Floor Sanders and Finishers", - "Tile and Stone Setters", - "Cement Masons and Concrete Finishers", - "Terrazzo Workers and Finishers", - "Construction Laborers", - "Paving, Surfacing, and Tamping Equipment Operators", - "Pile Driver Operators", - "Operating Engineers and Other Construction Equipment Operators", - "Drywall and Ceiling Tile Installers", - "Tapers", - "Electricians", - "Glaziers", - "Insulation Workers, Floor, Ceiling, and Wall", - "Insulation Workers, Mechanical", - "Painters, Construction and Maintenance", - "Paperhangers", - "Pipelayers", - "Plumbers, Pipefitters, and Steamfitters", - "Solar Thermal Installers and Technicians", - "Plasterers and Stucco Masons", - "Reinforcing Iron and Rebar Workers", - "Roofers", - "Sheet Metal Workers", - "Structural Iron and Steel Workers", - "Solar Photovoltaic Installers", - "Helpers--Brickmasons, Blockmasons, Stonemasons, and Tile and Marble Setters", - "Helpers--Carpenters", - "Helpers--Electricians", - "Helpers--Painters, Paperhangers, Plasterers, and Stucco Masons", - "Helpers--Pipelayers, Plumbers, Pipefitters, and Steamfitters", - "Helpers--Roofers", - "Helpers, Construction Trades, All Other", - "Construction and Building Inspectors", - "Energy Auditors", - "Elevator and Escalator Installers and Repairers", - "Fence Erectors", - "Hazardous Materials Removal Workers", - "Highway Maintenance Workers", - "Rail-Track Laying and Maintenance Equipment Operators", - "Septic Tank Servicers and Sewer Pipe Cleaners", - "Segmental Pavers", - "Construction and Related Workers, All Other", - "Weatherization Installers and Technicians", - "Derrick Operators, Oil and Gas", - "Rotary Drill Operators, Oil and Gas", - "Service Unit Operators, Oil and Gas", - "Excavating and Loading Machine and Dragline Operators, Surface Mining", - "Earth Drillers, Except Oil and Gas", - "Explosives Workers, Ordnance Handling Experts, and Blasters", - "Continuous Mining Machine Operators", - "Roof Bolters, Mining", - "Loading and Moving Machine Operators, Underground Mining", - "Underground Mining Machine Operators, All Other", - "Rock Splitters, Quarry", - "Roustabouts, Oil and Gas", - "Helpers--Extraction Workers", - "Extraction Workers, All Other", - "First-Line Supervisors of Mechanics, Installers, and Repairers", - "Computer, Automated Teller, and Office Machine Repairers", - "Radio, Cellular, and Tower Equipment Installers and Repairers", - "Telecommunications Equipment Installers and Repairers, Except Line Installers", - "Avionics Technicians", - "Electric Motor, Power Tool, and Related Repairers", - "Electrical and Electronics Installers and Repairers, Transportation Equipment", - "Electrical and Electronics Repairers, Commercial and Industrial Equipment", - "Electrical and Electronics Repairers, Powerhouse, Substation, and Relay", - "Electronic Equipment Installers and Repairers, Motor Vehicles", - "Audiovisual Equipment Installers and Repairers", - "Security and Fire Alarm Systems Installers", - "Aircraft Mechanics and Service Technicians", - "Automotive Body and Related Repairers", - "Automotive Glass Installers and Repairers", - "Automotive Service Technicians and Mechanics", - "Bus and Truck Mechanics and Diesel Engine Specialists", - "Farm Equipment Mechanics and Service Technicians", - "Mobile Heavy Equipment Mechanics, Except Engines", - "Rail Car Repairers", - "Motorboat Mechanics and Service Technicians", - "Motorcycle Mechanics", - "Outdoor Power Equipment and Other Small Engine Mechanics", - "Bicycle Repairers", - "Recreational Vehicle Service Technicians", - "Tire Repairers and Changers", - "Mechanical Door Repairers", - "Control and Valve Installers and Repairers, Except Mechanical Door", - "Heating, Air Conditioning, and Refrigeration Mechanics and Installers", - "Home Appliance Repairers", - "Industrial Machinery Mechanics", - "Maintenance Workers, Machinery", - "Millwrights", - "Refractory Materials Repairers, Except Brickmasons", - "Electrical Power-Line Installers and Repairers", - "Telecommunications Line Installers and Repairers", - "Camera and Photographic Equipment Repairers", - "Medical Equipment Repairers", - "Musical Instrument Repairers and Tuners", - "Watch and Clock Repairers", - "Precision Instrument and Equipment Repairers, All Other", - "Maintenance and Repair Workers, General", - "Wind Turbine Service Technicians", - "Coin, Vending, and Amusement Machine Servicers and Repairers", - "Commercial Divers", - "Locksmiths and Safe Repairers", - "Manufactured Building and Mobile Home Installers", - "Riggers", - "Signal and Track Switch Repairers", - "Helpers--Installation, Maintenance, and Repair Workers", - "Installation, Maintenance, and Repair Workers, All Other", - "Geothermal Technicians", - "First-Line Supervisors of Production and Operating Workers", - "Aircraft Structure, Surfaces, Rigging, and Systems Assemblers", - "Coil Winders, Tapers, and Finishers", - "Electrical and Electronic Equipment Assemblers", - "Electromechanical Equipment Assemblers", - "Engine and Other Machine Assemblers", - "Structural Metal Fabricators and Fitters", - "Fiberglass Laminators and Fabricators", - "Timing Device Assemblers and Adjusters", - "Team Assemblers", - "Assemblers and Fabricators, All Other", - "Bakers", - "Butchers and Meat Cutters", - "Meat, Poultry, and Fish Cutters and Trimmers", - "Slaughterers and Meat Packers", - "Food and Tobacco Roasting, Baking, and Drying Machine Operators and Tenders", - "Food Batchmakers", - "Food Cooking Machine Operators and Tenders", - "Food Processing Workers, All Other", - "Extruding and Drawing Machine Setters, Operators, and Tenders, Metal and Plastic", - "Forging Machine Setters, Operators, and Tenders, Metal and Plastic", - "Rolling Machine Setters, Operators, and Tenders, Metal and Plastic", - "Cutting, Punching, and Press Machine Setters, Operators, and Tenders, Metal and Plastic", - "Drilling and Boring Machine Tool Setters, Operators, and Tenders, Metal and Plastic", - "Grinding, Lapping, Polishing, and Buffing Machine Tool Setters, Operators, and Tenders, Metal and Plastic", - "Lathe and Turning Machine Tool Setters, Operators, and Tenders, Metal and Plastic", - "Milling and Planing Machine Setters, Operators, and Tenders, Metal and Plastic", - "Machinists", - "Metal-Refining Furnace Operators and Tenders", - "Pourers and Casters, Metal", - "Model Makers, Metal and Plastic", - "Patternmakers, Metal and Plastic", - "Foundry Mold and Coremakers", - "Molding, Coremaking, and Casting Machine Setters, Operators, and Tenders, Metal and Plastic", - "Multiple Machine Tool Setters, Operators, and Tenders, Metal and Plastic", - "Tool and Die Makers", - "Welders, Cutters, Solderers, and Brazers", - "Welding, Soldering, and Brazing Machine Setters, Operators, and Tenders", - "Heat Treating Equipment Setters, Operators, and Tenders, Metal and Plastic", - "Layout Workers, Metal and Plastic", - "Plating Machine Setters, Operators, and Tenders, Metal and Plastic", - "Tool Grinders, Filers, and Sharpeners", - "Metal Workers and Plastic Workers, All Other", - "Prepress Technicians and Workers", - "Printing Press Operators", - "Print Binding and Finishing Workers", - "Laundry and Dry-Cleaning Workers", - "Pressers, Textile, Garment, and Related Materials", - "Sewing Machine Operators", - "Shoe and Leather Workers and Repairers", - "Shoe Machine Operators and Tenders", - "Sewers, Hand", - "Tailors, Dressmakers, and Custom Sewers", - "Textile Bleaching and Dyeing Machine Operators and Tenders", - "Textile Cutting Machine Setters, Operators, and Tenders", - "Textile Knitting and Weaving Machine Setters, Operators, and Tenders", - "Textile Winding, Twisting, and Drawing Out Machine Setters, Operators, and Tenders", - "Extruding and Forming Machine Setters, Operators, and Tenders, Synthetic and Glass Fibers", - "Fabric and Apparel Patternmakers", - "Upholsterers", - "Textile, Apparel, and Furnishings Workers, All Other", - "Cabinetmakers and Bench Carpenters", - "Furniture Finishers", - "Model Makers, Wood", - "Patternmakers, Wood", - "Sawing Machine Setters, Operators, and Tenders, Wood", - "Woodworking Machine Setters, Operators, and Tenders, Except Sawing", - "Woodworkers, All Other", - "Nuclear Power Reactor Operators", - "Power Distributors and Dispatchers", - "Power Plant Operators", - "Biomass Plant Technicians", - "Hydroelectric Plant Technicians", - "Stationary Engineers and Boiler Operators", - "Water and Wastewater Treatment Plant and System Operators", - "Chemical Plant and System Operators", - "Gas Plant Operators", - "Petroleum Pump System Operators, Refinery Operators, and Gaugers", - "Plant and System Operators, All Other", - "Biofuels Processing Technicians", - "Chemical Equipment Operators and Tenders", - "Separating, Filtering, Clarifying, Precipitating, and Still Machine Setters, Operators, and Tenders", - "Crushing, Grinding, and Polishing Machine Setters, Operators, and Tenders", - "Grinding and Polishing Workers, Hand", - "Mixing and Blending Machine Setters, Operators, and Tenders", - "Cutters and Trimmers, Hand", - "Cutting and Slicing Machine Setters, Operators, and Tenders", - "Extruding, Forming, Pressing, and Compacting Machine Setters, Operators, and Tenders", - "Furnace, Kiln, Oven, Drier, and Kettle Operators and Tenders", - "Inspectors, Testers, Sorters, Samplers, and Weighers", - "Jewelers and Precious Stone and Metal Workers", - "Gem and Diamond Workers", - "Dental Laboratory Technicians", - "Medical Appliance Technicians", - "Ophthalmic Laboratory Technicians", - "Packaging and Filling Machine Operators and Tenders", - "Painting, Coating, and Decorating Workers", - "Coating, Painting, and Spraying Machine Setters, Operators, and Tenders", - "Semiconductor Processing Technicians", - "Photographic Process Workers and Processing Machine Operators", - "Computer Numerically Controlled Tool Operators", - "Computer Numerically Controlled Tool Programmers", - "Adhesive Bonding Machine Operators and Tenders", - "Cleaning, Washing, and Metal Pickling Equipment Operators and Tenders", - "Cooling and Freezing Equipment Operators and Tenders", - "Etchers and Engravers", - "Molders, Shapers, and Casters, Except Metal and Plastic", - "Stone Cutters and Carvers, Manufacturing", - "Glass Blowers, Molders, Benders, and Finishers", - "Potters, Manufacturing", - "Paper Goods Machine Setters, Operators, and Tenders", - "Tire Builders", - "Helpers--Production Workers", - "Production Workers, All Other", - "Aircraft Cargo Handling Supervisors", - "First-Line Supervisors of Helpers, Laborers, and Material Movers, Hand", - "Recycling Coordinators", - "First-Line Supervisors of Material-Moving Machine and Vehicle Operators", - "First-Line Supervisors of Passenger Attendants", - "First-Line Supervisors of Transportation Workers, All Other", - "Airline Pilots, Copilots, and Flight Engineers", - "Commercial Pilots", - "Air Traffic Controllers", - "Airfield Operations Specialists", - "Flight Attendants", - "Ambulance Drivers and Attendants, Except Emergency Medical Technicians", - "Driver/Sales Workers", - "Heavy and Tractor-Trailer Truck Drivers", - "Light Truck Drivers", - "Bus Drivers, School", - "Bus Drivers, Transit and Intercity", - "Shuttle Drivers and Chauffeurs", - "Taxi Drivers", - "Motor Vehicle Operators, All Other", - "Locomotive Engineers", - "Rail Yard Engineers, Dinkey Operators, and Hostlers", - "Railroad Brake, Signal, and Switch Operators and Locomotive Firers", - "Railroad Conductors and Yardmasters", - "Subway and Streetcar Operators", - "Rail Transportation Workers, All Other", - "Sailors and Marine Oilers", - "Captains, Mates, and Pilots of Water Vessels", - "Motorboat Operators", - "Ship Engineers", - "Bridge and Lock Tenders", - "Parking Attendants", - "Automotive and Watercraft Service Attendants", - "Aircraft Service Attendants", - "Traffic Technicians", - "Transportation Inspectors", - "Aviation Inspectors", - "Transportation Vehicle, Equipment and Systems Inspectors, Except Aviation", - "Passenger Attendants", - "Transportation Workers, All Other", - "Conveyor Operators and Tenders", - "Crane and Tower Operators", - "Dredge Operators", - "Hoist and Winch Operators", - "Industrial Truck and Tractor Operators", - "Cleaners of Vehicles and Equipment", - "Laborers and Freight, Stock, and Material Movers, Hand", - "Recycling and Reclamation Workers", - "Machine Feeders and Offbearers", - "Packers and Packagers, Hand", - "Stockers and Order Fillers", - "Gas Compressor and Gas Pumping Station Operators", - "Pump Operators, Except Wellhead Pumpers", - "Wellhead Pumpers", - "Refuse and Recyclable Material Collectors", - "Tank Car, Truck, and Ship Loaders", - "Material Moving Workers, All Other", - "Air Crew Officers", - "Aircraft Launch and Recovery Officers", - "Armored Assault Vehicle Officers", - "Artillery and Missile Officers", - "Command and Control Center Officers", - "Infantry Officers", - "Special Forces Officers", - "Military Officer Special and Tactical Operations Leaders, All Other", - "First-Line Supervisors of Air Crew Members", - "First-Line Supervisors of Weapons Specialists/Crew Members", - "First-Line Supervisors of All Other Tactical Operations Specialists", - "Air Crew Members", - "Aircraft Launch and Recovery Specialists", - "Armored Assault Vehicle Crew Members", - "Artillery and Missile Crew Members", - "Command and Control Center Specialists", - "Infantry", - "Special Forces", - "Military Enlisted Tactical Operations and Air/Weapons Specialists and Crew Members, All Other" -] \ No newline at end of file diff --git a/src/workrb/tasks/__init__.py b/src/workrb/tasks/__init__.py index d5dc5c8..6ead8fe 100644 --- a/src/workrb/tasks/__init__.py +++ b/src/workrb/tasks/__init__.py @@ -15,7 +15,7 @@ from .ranking.job2skill import ESCOJob2SkillRanking from .ranking.job_similarity import JobTitleSimilarityRanking from .ranking.jobnorm import JobBERTJobNormRanking -from .ranking.jobnorm_onet import ONETJobNormRanking +from .ranking.jobnorm_onet import JobBERTONetJobNormRanking from .ranking.melo import MELORanking from .ranking.mels import MELSRanking from .ranking.skill2job import ESCOSkill2JobRanking @@ -64,5 +64,5 @@ "SkillMatch1kSkillSimilarityRanking", "ProjectCandidateRanking", "SearchQueryCandidateRanking", - "ONETJobNormRanking", + "JobBERTONetJobNormRanking", ] diff --git a/src/workrb/tasks/ranking/__init__.py b/src/workrb/tasks/ranking/__init__.py index 10c6cfe..7f7c03f 100644 --- a/src/workrb/tasks/ranking/__init__.py +++ b/src/workrb/tasks/ranking/__init__.py @@ -14,7 +14,7 @@ from workrb.tasks.ranking.job2skill import ESCOJob2SkillRanking from workrb.tasks.ranking.job_similarity import JobTitleSimilarityRanking from workrb.tasks.ranking.jobnorm import JobBERTJobNormRanking -from workrb.tasks.ranking.jobnorm_onet import ONETJobNormRanking +from workrb.tasks.ranking.jobnorm_onet import JobBERTONetJobNormRanking from workrb.tasks.ranking.melo import MELORanking from workrb.tasks.ranking.mels import MELSRanking from workrb.tasks.ranking.skill2job import ESCOSkill2JobRanking @@ -40,10 +40,10 @@ "HouseGradedSkillExtractRanking", "HouseSkillExtractRanking", "JobBERTJobNormRanking", + "JobBERTONetJobNormRanking", "JobTitleSimilarityRanking", "MELORanking", "MELSRanking", - "ONETJobNormRanking", "ProjectCandidateRanking", "SearchQueryCandidateRanking", "SkillMatch1kSkillSimilarityRanking", diff --git a/src/workrb/tasks/ranking/jobnorm_onet.py b/src/workrb/tasks/ranking/jobnorm_onet.py index 37cccb2..13ba7dd 100644 --- a/src/workrb/tasks/ranking/jobnorm_onet.py +++ b/src/workrb/tasks/ranking/jobnorm_onet.py @@ -1,6 +1,7 @@ -import json -from importlib import resources +import csv +from pathlib import Path +import requests from datasets import load_dataset from workrb.registry import register_task @@ -8,45 +9,90 @@ from workrb.tasks.abstract.ranking_base import RankingDataset, RankingTask, RankingTaskGroup from workrb.types import ModelInputType -TARGET_SPACE = [] -with resources.open_text("workrb.data", "onet_30.json") as f: - TARGET_SPACE = json.load(f) - @register_task() -class ONETJobNormRanking(RankingTask): +class JobBERTONetJobNormRanking(RankingTask): @property def name(self) -> str: + """Job Normalization task name.""" return "ONET Job Title Normalization" @property def description(self) -> str: + """Job Normalization task description.""" return "Normalize job titles to canonical O*NET occupation groups" @property def task_group(self) -> RankingTaskGroup: + """Job Normalization task group.""" return RankingTaskGroup.JOB_NORMALIZATION @property def supported_query_languages(self) -> list[Language]: + """Supported query languages are always English.""" return [Language.EN] @property def supported_target_languages(self) -> list[Language]: + """Supported target languages are always English.""" return [Language.EN] @property def label_type(self) -> LabelType: + """Label type is single label.""" return LabelType.SINGLE_LABEL @property def query_input_type(self) -> ModelInputType: + """Query input type for job titles""" return ModelInputType.JOB_TITLE @property def target_input_type(self) -> ModelInputType: + """Target input type for O*NET occupations.""" return ModelInputType.JOB_TITLE + def _download_onet_data(self) -> bool: + """Downloads O*NET version 30.3 Occupations Data from O*NET website + + Returns + ------- + bool + """ + url = "https://www.onetcenter.org/dl_files/database/db_30_3_text/Occupation%20Data.txt" + filename = "onet_30_3_occupations.txt" + r = requests.get(url) + if r.status_code == 200: + with open(filename, "wb") as file: + file.write(r.content) + return True + else: + return False + + def _check_onet_data_exists(self) -> bool: + """Loads downloaded TSV file from O*NET and forms target space + + Returns + ------- + bool + """ + file_path = Path("onet_30_3_occupations.txt") + return file_path.is_file() + + def _load_onet_target_space(self) -> dict: + """Loads downloaded TSV file from O*NET and forms target space + + Returns + ------- + target_space: dict[str, int] + """ + target_space = {} + with open("onet_30_3_occupations.txt") as f: + csvf = csv.DictReader(f, delimiter="\t") + for index, row in enumerate(csvf): + target_space[row["Title"]] = index + return target_space + def load_dataset(self, dataset_id: str, split: DatasetSplit) -> RankingDataset: """Load job normalization data for a specific split and dataset. @@ -58,6 +104,14 @@ def load_dataset(self, dataset_id: str, split: DatasetSplit) -> RankingDataset: ------- RankingDataset object """ + # Download file from O*NET if not in local directory + if not self._check_onet_data_exists(): + print("Downloading O*NET v 30.3 Occupations Data") + self._download_onet_data() + + # Create target space for metrics + target_space = self._load_onet_target_space() + query_texts, target_indices = [], [] ds = load_dataset("workforcedeveloper/JobBERT-ONET-evaluation-dataset") @@ -65,14 +119,14 @@ def load_dataset(self, dataset_id: str, split: DatasetSplit) -> RankingDataset: ds_split = ds[split_map[split]] df = ds_split.to_pandas() for index, row in df.iterrows(): - if row["onet_job_title"] in TARGET_SPACE: + if row["onet_job_title"] in target_space: query_texts.append(row["vacancy_job_title"]) - target_index = TARGET_SPACE.index(row["onet_job_title"]) + target_index = target_space[row["onet_job_title"]] target_indices.append([target_index]) return RankingDataset( query_texts=query_texts, target_indices=target_indices, - target_space=TARGET_SPACE, + target_space=target_space, dataset_id=dataset_id, ) From 583cae4ebe22735cd4788b9712f7ca6896071145 Mon Sep 17 00:00:00 2001 From: blackmlengineer Date: Sat, 4 Jul 2026 17:19:37 -0500 Subject: [PATCH 4/6] docs: updating readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b242970..712fdac 100644 --- a/README.md +++ b/README.md @@ -82,7 +82,7 @@ pip install workrb | Job to Skills WorkBench | `ESCOJob2SkillRanking` | multi_label | 3039 queries x 13939 targets | 28 | | Job Title Similarity | `JobTitleSimilarityRanking` | multi_label | 105 queries x 2619 targets | 11 | | Job Normalization | `JobBERTJobNormRanking` | single_label | 15463 queries x 2942 targets | 28 | -| Job Normalization (O*NET) | `ONETJobNormRanking` | single_label | 13615 queries x 1016 targets | 1 | +| Job Normalization (O*NET) | `JobBERTONetJobNormRanking` | single_label | 13615 queries x 1016 targets | 1 | | Job Normalization MELO | `MELORanking` | multi_label | 633 queries x 33813 targets | 21 | | Skill to Job WorkBench | `ESCOSkill2JobRanking` | multi_label | 13492 queries x 3039 targets | 28 | | Skill Extraction House | `HouseSkillExtractRanking` | multi_label | 262 queries x 13891 targets | 28 | From 1705c968a7eaf5eae5baba48315b7ddf36b8263a Mon Sep 17 00:00:00 2001 From: blackmlengineer Date: Sat, 1 Aug 2026 10:55:55 -0500 Subject: [PATCH 5/6] fix: fixing issue with test --- tests/test_jobnorm_onet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_jobnorm_onet.py b/tests/test_jobnorm_onet.py index 0129ff4..02e1f41 100644 --- a/tests/test_jobnorm_onet.py +++ b/tests/test_jobnorm_onet.py @@ -4,7 +4,7 @@ def test_my_custom_task_loads(): """Test that task loads without errors""" - task = workrb.tasks.ONETJobNormRanking(split="val", languages=["en"]) + task = workrb.tasks.JobBERTONetJobNormRanking(split="val", languages=["en"]) dataset_id = Language.EN.value dataset = task.datasets[dataset_id] From 47a0277b008ba42e39c8aff656d0ba97f47d613b Mon Sep 17 00:00:00 2001 From: blackmlengineer Date: Sat, 1 Aug 2026 11:03:40 -0500 Subject: [PATCH 6/6] fix: downloading data to cache --- src/workrb/tasks/ranking/jobnorm_onet.py | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/src/workrb/tasks/ranking/jobnorm_onet.py b/src/workrb/tasks/ranking/jobnorm_onet.py index 13ba7dd..f866813 100644 --- a/src/workrb/tasks/ranking/jobnorm_onet.py +++ b/src/workrb/tasks/ranking/jobnorm_onet.py @@ -1,6 +1,7 @@ import csv from pathlib import Path +import appdirs import requests from datasets import load_dataset @@ -12,6 +13,14 @@ @register_task() class JobBERTONetJobNormRanking(RankingTask): + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + # Cache dir pattern mirrors ESCO (src/workrb/data/esco.py:130-131), + # but uses "workrb" as the app name. + cache_dir = appdirs.user_cache_dir("workrb") + self.base_path = Path(cache_dir) / "onet" + self.onet_file_path = self.base_path / "onet_30_3_occupations.txt" + @property def name(self) -> str: """Job Normalization task name.""" @@ -60,24 +69,23 @@ def _download_onet_data(self) -> bool: bool """ url = "https://www.onetcenter.org/dl_files/database/db_30_3_text/Occupation%20Data.txt" - filename = "onet_30_3_occupations.txt" r = requests.get(url) if r.status_code == 200: - with open(filename, "wb") as file: + self.base_path.mkdir(parents=True, exist_ok=True) + with open(self.onet_file_path, "wb") as file: file.write(r.content) return True else: return False def _check_onet_data_exists(self) -> bool: - """Loads downloaded TSV file from O*NET and forms target space + """Checks whether the O*NET data file already exists in the cache dir. Returns ------- bool """ - file_path = Path("onet_30_3_occupations.txt") - return file_path.is_file() + return self.onet_file_path.is_file() def _load_onet_target_space(self) -> dict: """Loads downloaded TSV file from O*NET and forms target space @@ -87,7 +95,7 @@ def _load_onet_target_space(self) -> dict: target_space: dict[str, int] """ target_space = {} - with open("onet_30_3_occupations.txt") as f: + with open(self.onet_file_path) as f: csvf = csv.DictReader(f, delimiter="\t") for index, row in enumerate(csvf): target_space[row["Title"]] = index @@ -104,7 +112,7 @@ def load_dataset(self, dataset_id: str, split: DatasetSplit) -> RankingDataset: ------- RankingDataset object """ - # Download file from O*NET if not in local directory + # Download file from O*NET if not in cache if not self._check_onet_data_exists(): print("Downloading O*NET v 30.3 Occupations Data") self._download_onet_data()