import { KeyphraseEntry, PhrasesModel } from './types'; /** * Applies two weighting passes to a keyphrase list: * * 1. **Wiki-entity bonus** \u2014 if any token in the phrase is a Wikipedia-linked * entity (POS tag 5), the keyphrase weight is doubled and `wiki` is set. * 2. **IDF domain-specificity** \u2014 weight is multiplied by the average POS * uniqueness score across the phrase's tokens. Rare, domain-specific terms * (high uniqueness) receive a larger multiplier than common nouns. * 3. **Heavy-query bias** (optional) \u2014 if `heavyWeightQuery` is set, keyphrases * that closely match the query words receive a large additive bonus, allowing * dynamic re-ranking when a user clicks a term or arrives via a search query. * * @param keyphrases - Keyphrases to weight; mutated in-place for efficiency. * @param phrasesModel - Trie model passed to the tokenizer (may be undefined). * @param heavyWeightQuery - Space-separated query string to bias ranking toward. * @returns The same array with updated `weight` and `wiki` fields. * * @example * const weighted = weightKeyphrasesBySpecificity(keyphrases, model, "self attention"); */ export declare function weightKeyphrasesBySpecificity(keyphrases: KeyphraseEntry[], phrasesModel: PhrasesModel | undefined, heavyWeightQuery: string): KeyphraseEntry[];