@thecodingwhale/cv-processor
Version:
CV Processor to extract structured data from PDF resumes using TypeScript
70 lines (69 loc) • 1.82 kB
TypeScript
/**
* Interface for consensus results
*/
export interface ConsensusResult {
consensus: any;
confidence: {
overall: number;
fields: Record<string, number>;
};
metadata: {
providerCount: number;
consensusStrength: number;
generatedAt: string;
};
}
/**
* The ConsensusBuilder class analyzes multiple CV data extractions
* and builds a consensus version that represents the most likely correct data.
*/
export declare class ConsensusBuilder {
/**
* Build consensus from multiple CV data files
*/
buildConsensus(dataFiles: string[]): Promise<ConsensusResult>;
/**
* Build consensus for resume structure (hierarchical)
*/
private buildResumeConsensus;
/**
* Build consensus for credits structure (flat)
*/
private buildCreditsConsensus;
/**
* Extract all unique categories from all data
*/
private extractAllCategories;
/**
* Build consensus for a specific category
*/
private buildCategoryConsensus;
/**
* Build consensus for a specific credit from similar credits
*/
private buildCreditConsensus;
/**
* Group similar credits based on title and role similarity
*/
private groupSimilarCredits;
/**
* Find the consensus value from a list of values
*/
private findConsensusValue;
/**
* Calculate similarity between two strings (Jaccard similarity)
*/
private calculateStringSimilarity;
/**
* Determine if years should be shown based on majority
*/
private determineShowYears;
/**
* Calculate confidence score for a list of values
*/
private calculateConfidence;
/**
* Generate a consistent ID from input data
*/
private generateConsistentId;
}