/** * Stateless scoring primitives for the solution matcher. * * Extracted from solution-matcher.ts — these are pure functions with no * filesystem or module-level state dependencies. */ /** High-frequency tags that should be weighted lower */ export declare const COMMON_TAGS: Set; /** Apply IDF-like weight: common tags get reduced weight */ export declare function tagWeight(tag: string): number; /** * Compute the Dice coefficient between two strings using character bigrams. * * Dice = 2 * |intersection| / (|A| + |B|) * * Both strings are lowercased and whitespace-stripped before bigram generation. * Returns 0 for empty strings or single-character strings (no bigrams possible). * Returns 1.0 for identical non-trivial strings. * * This is used as a lightweight fuzzy matching signal for borderline cases * where the TF-IDF tag intersection produces a low score but the query and * solution tags are character-similar (e.g., "database" vs "데이터베이스" * won't match, but "database" vs "databse" will get a high score). */ export declare function bigramSimilarity(a: string, b: string): number; /** * Simplified BM25 score for a single query-document pair. * Uses tag overlap with term frequency normalization. * k1=1.2, b=0.75 (standard BM25 parameters). */ export declare function bm25Score(queryTags: string[], docTags: string[], avgDocLength: number): number;