import { NgramMap, TopicToken } from './types'; /** * Extracts noun-anchored edge-grams from a token array and accumulates them into `nGrams`. * * An edge-gram is a contiguous slice of `nGramSize` tokens where: * - The **first** and **last** tokens are topic entities (noun or wiki title). * - Every token is either a topic entity or a common stop word (e.g. "of", "the"). * - Every token meets the `minWordLength` character threshold. * * This allows natural multi-word keyphrases like "state of the art" or * "machine learning" while ignoring pure function-word sequences. * * @param nGramSize - Number of tokens in the slice to evaluate. * @param terms - Full token array for the current sentence. * @param index - Start position for this slice within `terms`. * @param nGrams - Accumulator map mutated in-place: `nGrams[size][phrase] = [sentenceIdx, ...]`. * @param minWordLength - Minimum character length for any word to be included. * @param sentenceIndex - Index of the originating sentence, appended to the phrase's entry. * @returns The same `nGrams` reference (mutated). * * @example * const terms: TopicToken[] = [["machine", 1, 4, ""], ["learning", 1, 5, ""]]; * const nGrams: NgramMap = {}; * extractNounEdgeGrams(2, terms, 0, nGrams, 3, 0); * // nGrams[2]["machine learning"] === [0] */ export declare function extractNounEdgeGrams(nGramSize: number, terms: TopicToken[], index: number, nGrams: NgramMap, minWordLength: number, sentenceIndex: number): NgramMap;