/**
 * @copyright Sister Software
 * @license AGPL-3.0
 * @author Teffen Ellis, et al.
 */
import { Displayable } from "../resources/debugging.js";
import type { Alpha3bLanguageCode } from "../resources/languages/index.js";
import type { LibPostalLanguageCode } from "../resources/libpostal.js";
/**
 * Classification recognized by Mailwoman.
 */
export declare const Classifications: Set<"unknown" | "adjacent" | "alpha" | "alphanumeric" | "area" | "chain" | "country" | "dependency" | "directional" | "end_token_single_character" | "end_token" | "given_name" | "house_number" | "intersection" | "level_designator" | "level" | "locality" | "middle_initial" | "multistreet" | "numeric" | "ordinal" | "person" | "personal_suffix" | "personal_title" | "place" | "postcode" | "punctuation" | "region" | "road_type" | "start_token" | "stop_word" | "street_name" | "street_prefix" | "street_proper_name" | "street_suffix" | "street" | "surname" | "toponym" | "unit_designator" | "unit" | "venue">;
export type Classification = typeof Classifications extends Set<infer T> ? T : never;
/**
 * Public classification labels.
 */
declare const VisibleClassification: Set<"country" | "dependency" | "house_number" | "level_designator" | "level" | "locality" | "postcode" | "region" | "street" | "unit_designator" | "unit" | "venue">;
/**
 * Classification labels that are exposed to API consumers.
 */
export type VisibleClassification = typeof VisibleClassification extends Set<infer T> ? T : never;
/**
 * Type guard for visible classification labels.
 */
export declare function isVisibleClassification(match: ClassificationMatch): match is ClassificationMatch & {
    classification: VisibleClassification;
};
export declare function isVisibleClassification(classification: Classification): classification is VisibleClassification;
export type ClassificationMap = Map<VisibleClassification, string[]>;
export type ClassificationConfidenceMap = Map<VisibleClassification, number>;
export type ClassificationConfidenceRecord = Record<VisibleClassification, number | undefined>;
export type ClassificationRecord = Partial<Record<VisibleClassification, string[]>>;
/**
 * A classification match for a span of text.
 */
export interface ClassificationMatch {
    /**
     * The classification assigned to the text.
     */
    readonly classification: Classification;
    /**
     * The confidence of the classification.
     */
    readonly confidence: number;
    /**
     * Languages for which the classification is valid.
     *
     * If a language is present in this set, it means that the value which it is associated with is a
     * valid value in that language.
     */
    readonly languages?: Displayable<ReadonlySet<LibPostalLanguageCode | Alpha3bLanguageCode>>;
    /**
     * Flags associated with the classification, i.e. clarifying details to enhance the
     * classification.
     */
    readonly flags?: Set<string>;
}
export type ClassificationsMatchInput = ClassificationMatch | Classification;
/**
 * A map of classifications to matches.
 */
export declare class ClassificationsMatchMap extends Map<Classification, ClassificationMatch> {
    /**
     * Add a classification to the map if it has a higher confidence than the existing classification.
     */
    add(classification: Classification, confidence?: number): void;
    add(classificationMatch: Partial<ClassificationMatch>): void;
    /**
     * Predicate to determine if the map contains a classification that is visible.
     */
    hasVisibleClassification(classification?: VisibleClassification): boolean;
    /**
     * Serialize the classification map to JSON.
     */
    toJSON(): ClassificationMatch[];
    static from(...input: ClassificationsMatchInput[]): ClassificationsMatchMap;
}
export {};
//# sourceMappingURL=Classification.d.ts.map