/**
 * @copyright Sister Software
 * @license AGPL-3.0
 * @author Teffen Ellis, et al.
 */
import { Alpha2LanguageCode } from "mailwoman/core";
import { Classifier, ClassifierConstructor } from "mailwoman/core/classification";
import { FilterRelation, SerializedSolution, Solution, Solver, SolverConstructor } from "mailwoman/core/solver";
import { TokenContext } from "mailwoman/core/tokenization";
import type { PerformanceMeasure } from "node:perf_hooks";
export interface AddressParserOptions {
    classifiers?: Iterable<Classifier | ClassifierConstructor>;
    solvers?: Iterable<Solver | SolverConstructor>;
    languages?: Alpha2LanguageCode[] | readonly Alpha2LanguageCode[] | Set<Alpha2LanguageCode> | ReadonlySet<Alpha2LanguageCode>;
    solutionLimit?: number;
    mustNotFollow?: FilterRelation[];
}
export interface ParseOptions {
    verbose?: boolean;
}
export interface VerboseParseResult {
    solutions: Solution[];
    context: TokenContext;
    measures: {
        tokenizer: PerformanceMeasure;
        classifier: PerformanceMeasure;
        solver: PerformanceMeasure;
    };
}
/**
 * Parses a tokenized address into a structured address.
 */
export declare class AddressParser {
    #private;
    protected classifiers: Classifier[];
    protected solvers: Solver[];
    protected solutionLimit: number;
    constructor({ languages, classifiers, solvers, solutionLimit }?: AddressParserOptions);
    ready(): Promise<this>;
    /**
     * Parse an address. A high-level function that runs all classifiers and solvers.
     *
     * @param input - The address to parse.
     */
    parse(input: string, options: ParseOptions & {
        verbose: true;
    }): Promise<VerboseParseResult>;
    parse(input: string, options?: ParseOptions): Promise<SerializedSolution[]>;
    /**
     * Run all classifiers.
     */
    protected classify(context: TokenContext): void;
    /**
     * Get the performance measure for a classifier in the most recent parse.
     */
    sampleClassifierMeasure(classifier: Classifier): PerformanceMeasure | undefined;
    /**
     * Run all solvers.
     */
    findSolutions(context: TokenContext): Solution[];
}
//# sourceMappingURL=AddressParser.d.ts.map