/** * Extract a `base_model:` value from a README's YAML frontmatter, or null. * Handles a single-string value or an array (returns the first entry). */ export declare function extractBaseModel(readme: string): string | null; /** * Detect the model's primary language from YAML frontmatter `language:` or * (failing that) the model id's `-en-` / `-zh-` / `_ja` style suffix. * Returns ISO 639-1 code ('en', 'zh', 'ja', 'fa', 'ru', etc.) or null when * the model is multilingual or the language is undeclared. */ export declare function detectModelLanguage(readme: string | null, modelId: string): string | null; /** * Map an ISO 639 language code to its dominant script class. Multi-script * languages (Japanese mixes kana + kanji — both treated as 'cjk' here) * collapse to the broadest family. Returns null for languages we don't * have a mapping for (the language filter then no-ops). */ export declare function languageToScript(lang: string): string | null; /** * Classify a candidate prefix string by dominant script. Used to filter * README-fingerprinted prefixes against the model's declared language — * fixes BGE-en picking the Chinese prefix because the EN+ZH README * documents both side-by-side and ZH appears more often. */ export declare function detectPrefixScript(prefix: string): string; /** * Fingerprint a README for query/document prefixes. Generic — counts quoted * candidate strings and ranks by frequency + presence of query/instruction * keywords. When `expectedScript` is set (i.e. the model declares a single * language), candidates with a non-matching script are dropped first. */ export declare function resolvePromptsFromReadme(readme: string, expectedScript?: string | null): { query: string | null; document: string | null; };