UNPKG

@thecodingwhale/cv-processor

Version:

CV Processor to extract structured data from PDF resumes using TypeScript

35 lines (34 loc) 1.06 kB
import { AccuracyScore, CVData, ProcessorOptions } from '../types'; /** * Utility class to calculate accuracy scores for CV data based on null values * The fewer null values, the higher the accuracy score */ export declare class NullBasedAccuracyCalculator { private minAccuracyThreshold; private fieldWeights; constructor(options?: ProcessorOptions); /** * Calculate accuracy score for the extracted CV data based on null values */ calculateAccuracy(cvData: CVData): AccuracyScore; /** * Check if CV meets the minimum accuracy threshold */ meetsThreshold(accuracy: AccuracyScore): boolean; /** * Calculate confidence based on key fields and data consistency */ private calculateConfidence; /** * Calculate scores for individual sections */ private calculateSectionScores; /** * Check if CV has inconsistent dates */ private hasInconsistentDates; /** * Check if CV has unreasonable field lengths */ private hasUnreasonableFieldLengths; }