import type { TFIDFConfig } from '../../types/index.js';
/** Tokenize text: split on whitespace/punctuation, split camelCase, lowercase, remove stop words. */
export declare function tokenize(text: string, stopWords?: Set<string>): string[];
/** TF-IDF engine: stateful, maintains vocabulary (IDF) across documents. */
export declare class TFIDFEngine {
    private readonly config;
    private readonly docFreq;
    private docCount;
    private vocabulary;
    private vocabDirty;
    constructor(config?: Partial<TFIDFConfig>);
    /** Add a document to the corpus (updates IDF). */
    addDocument(text: string): void;
    /** Rebuild vocabulary: top-K most discriminating terms by IDF. */
    private rebuildVocabulary;
    /** Generate a normalized TF-IDF embedding for the given text. */
    embed(text: string): number[];
    /** Batch embed multiple texts. */
    batchEmbed(texts: string[]): number[][];
    /** Get current vocabulary size. */
    getVocabularySize(): number;
    /** Get document count in corpus. */
    getDocumentCount(): number;
    /** Export state for serialization. */
    exportState(): {
        docFreq: [string, number][];
        docCount: number;
    };
    /** Import state from serialized form. */
    importState(state: {
        docFreq: [string, number][];
        docCount: number;
    }): void;
}
//# sourceMappingURL=tfidf.d.ts.map