import type { Sequence } from 'gensequence'; import type { AffWord } from './affDef.js'; import type { Aff } from './affLegacy.js'; import type { WordInfo } from './types.js'; export { WordInfo } from './types.js'; export interface HunspellSrcData { /** The Aff rules to use with the dictionary entries */ aff: Aff; /** the hunspell dictionary entries complete with affix flags */ dic: string[]; } export declare class IterableHunspellReaderLegacy implements Iterable { readonly src: HunspellSrcData; readonly aff: Aff; constructor(src: HunspellSrcData); get dic(): string[]; set maxDepth(value: number); get maxDepth(): number; /** the number of .dic entries */ get size(): number; /** * @internal */ dicWordsSeq(): Sequence; /** * iterates through the root words of the dictionary */ iterateRootWords(): Iterable; iterateWords(): Iterable; /** * Iterator for all the words in the dictionary. The words are in the order found in the .dic after the * transformations have been applied. Forbidden and CompoundOnly words are filtered out. */ [Symbol.iterator](): Sequence; /** * create an iterable sequence of the words in the dictionary. * * @param tapPreApplyRules -- optional function to be called before rules are applied to a word. * It is mostly used for monitoring progress in combination with `size`. */ seqAffWords(tapPreApplyRules?: (dicEntry: string, index: number) => void, maxDepth?: number): Sequence; /** * create an iterable sequence of the words in the dictionary. * * @param tapPreApplyRules -- optional function to be called before rules are applied to a word. * It is mostly used for monitoring progress in combination with `size`. */ seqTransformDictionaryEntries(tapPreApplyRules?: (dicEntry: string, index: number) => void, maxDepth?: number): Sequence; /** * Iterator for all the words in the dictionary. The words are in the order found in the .dic after the * transformations have been applied. Forbidden and CompoundOnly ARE INCLUDED. * * @internal */ seqWords(): Sequence; /** * Returns an iterable that will only return stand alone words. */ wholeWords(): Sequence; /** * @internal */ seqRootWords(): Sequence; /** * * @param affFile - path to aff file. * @param dicFile - path to dic file. * @returns IterableHunspellReader */ static createFromFiles(affFile: string, dicFile: string): Promise; } export declare function createMatchingWordsFilter(): (t: string) => boolean; //# sourceMappingURL=IterableHunspellReaderLegacy.d.ts.map