docs
evals
scenario-1
scenario-10
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
Build a tool that analyzes text files to identify all possible character encodings with confidence scores. The tool should read a file and return a ranked list of encoding matches.
/**
* Analyzes a file and returns all possible character encodings
* sorted by confidence score (highest first).
*
* @param filePath - Path to the file to analyze
* @returns Array of encoding matches with confidence scores
*/
export function analyzeFile(filePath: string): Promise<EncodingMatch[]>;
/**
* Represents a single encoding match with confidence
*/
export interface EncodingMatch {
name: string;
confidence: number;
lang?: string;
}
/**
* Main CLI entry point
*/
export function main(): Promise<void>;Provides character encoding detection with detailed confidence scoring for multiple possible encodings.