import type { Position, ProgramTag } from "./codes.js"; export type MatchProfile = { education?: string; major?: string; political?: string; province?: string; grassroots?: string; keywords?: string[]; program?: ProgramTag; year?: number; }; export type MatchResult = Position & { fit_score: number; fit_reasons: string[]; }; type MajorEntry = { code: string; name: string; }; type CategoryEntry = { code: string; name: string; group: string; level: string; majors: MajorEntry[]; }; /** * Look up the category(ies) a user-provided major belongs to. * Returns matching categories ranked by name overlap. * Empty array = unknown major (caller should fall back to string match). */ export declare function findMajorCategory(userMajor: string): CategoryEntry[]; /** * Parse a position's major field into a structured list of accepted categories * and majors. Handles common separators (; ; , , 、 /) and embedded codes * like "计算机科学与技术(0812)" or "0809计算机类". */ export declare function parsePositionMajor(positionMajor: string): { unlimited: boolean; categoryCodes: string[]; categoryNames: string[]; majorNames: string[]; rawTokens: string[]; }; /** * Smart major match: user's major matches a position's major requirement if * 1. position is 不限, OR * 2. user's resolved category code ∈ position's accepted category codes, OR * 3. user's major name ∈ position's accepted major names, OR * 4. fallback string-includes (preserved from old behavior). * * Returns { matched, reason } so callers can attribute the match. */ export declare function smartMatchMajor(positionMajor: string, userMajor: string): { matched: boolean; reason: "unlimited" | "category" | "major" | "string" | "none"; }; export declare function matchPositions(profile: MatchProfile): MatchResult[]; export {};