UNPKG

@thecodingwhale/cv-processor

Version:

CV Processor to extract structured data from PDF resumes using TypeScript

44 lines (43 loc) 1.45 kB
import { AIProvider } from '../types/AIProvider'; /** * AIPatternExtractor class * Uses AI to dynamically identify and extract patterns from CV text * This replaces the static patterns.ts file with context-aware pattern recognition */ export declare class AIPatternExtractor { private aiProvider; private patternCache; private tokenUsage; constructor(aiProvider: AIProvider); /** * Extract industry-specific patterns from CV text * @param text The CV text to analyze * @param industryContext Additional context about the industry (e.g., "film and TV") * @returns An object containing recognized patterns */ extractPatterns(text: string, industryContext?: string): Promise<any>; /** * Extract patterns specific to a section (like skills, credits, etc.) * @param sectionText The text of the specific section * @param sectionType The type of section (skills, credits, etc.) * @returns Extracted patterns relevant to that section */ extractSectionPatterns(sectionText: string, sectionType: string): Promise<any>; /** * Get token usage statistics */ getTokenUsage(): TokenUsage; /** * Reset token usage statistics */ resetTokenUsage(): void; } /** * Interface for tracking token usage */ export interface TokenUsage { promptTokens: number; completionTokens: number; totalTokens: number; estimatedCost?: number; }