import type { Aff, Flag, Flags, FlagSet } from "../aff"; import type { Prefix, Suffix } from "../aff/affix"; import { CapType } from "../constants"; /** A word as found in a {@link Dic} instance's index. */ export declare class Word { private aff; /** The raw stem of the word, as parsed from the `.dic` file. */ stem: string; /** The capitalization type of this word. */ capType: CapType; /** The {@link Flags} that this word is associated with. */ flags?: Flags; /** * Misc. data that the word was associated with in the `.dic` file. e.g. * determining if `is:gendered` is associated with a word would be * `word.data.get("is").has("gendered")`. */ data?: Map>; /** Common misspellings for this word. */ altSpellings?: Set; /** The {@link Affix} instances that apply to this word. */ affixes?: { prefixes: Set; suffixes: Set; }; /** * @param line - The line from a `.dic` file to parse. Can also just be * treated as a "word" argument. * @param aff - {@link Aff} data to use. */ constructor(line: string, aff: Aff); /** * Determines if this word has the given flag. * * @param flag - The flag to check for. Can be undefined, which will return false. */ has(flag?: Flag): boolean; /** * Returns the forms (permutations) of this {@link Word}, with all valid * suffixes and prefixes. * * @param similarTo - The string/word that the forms found should be similar to. */ forms(similarTo?: string): string[]; /** * Utility function for generating a {@link FlagSet} from an array of words. * * @param words - The words to generate the flag set from. */ static flagSets(words: Word[]): FlagSet; }