import { Media } from "../types/index.ts"; type MatchCriteria = { title?: string; year?: string; date?: string; duration?: string; }; /** Calculates a match score between a media item and target properties * * For movies/series: * Score range `[0 <-> 170]` * * For channels: * Score range `[0 <-> 100]` * * Scoring breakdown: * - `Title` similarity (`up to 100 points`): Based on cosine similarity of the media title and target title, scaled to 100. * - `Year` match (`50 points`): If the media's release year matches the target year, add 50 points. * - `Duration` similarity (`up to 20 points`): Based on how close the media's duration is to the target duration, with a maximum of 20 points for an exact match and decreasing as the difference increases. * * @argument title - Match is considered true when similarity is 80 points or higher */ export declare function calculateMatchScore(criteria: MatchCriteria, media: Media): number; /** * Helper function for name similarity scoring * @param itemName - The name of the item to compare * @param targetName - The target name to compare against * @returns The calculated distance score ( Thee lower the score, the more similar the names are ) */ export declare function advanceLevenshteinDistance(itemName: string | null | undefined, targetName: string | null | undefined): number; /** * Basic Levenshtein implementation for string similarity * @param a - First string * @param b - Second string * @returns The Levenshtein distance between the two strings */ export declare function levenshteinDistance(a: string, b: string): number; /** * Cosine similarity for string comparison based on word frequency vectors * @param a - First string * @param b - Second string * @returns The cosine similarity score between the two strings (0 to 1, where 1 means identical) */ export declare function cosineSimilarity(a: string, b: string): number; export {};