/** * @copyright Sister Software * @license AGPL-3.0 * @author Teffen Ellis, et al. * * Generates address pairs in which context decides whether a leading five-digit token is a house number or a postcode. */ import type { ComponentTag } from "@mailwoman/codex/component"; /** * A US locality, region and postcode used as an address tail. */ export interface AnchorAbsorptionBaseTuple { locality: string; region: string; postcode: string; } /** * The row templates. * * Names that start with `h-` produce a house number and names that start with `p-` a postcode. */ export type AnchorAbsorptionTemplate = "h-adversarial" | "h-no-trailing-locality" | "p-us-rural" | "p-de" | "anchor-fp" | "locale-ambig" | "standard"; /** * Options for {@link synthesizeAnchorAbsorptionRow}. */ export interface AnchorAbsorptionSynthesisOpts { random?: () => number; forceTemplate?: AnchorAbsorptionTemplate; /** * Real US ZIP codes from the postcode-anchor lookup. * * The templates place them where the anchor fires on a token that is really a house number. * The default is the postcodes of the built-in US tuples. */ realZips?: ReadonlyArray; } /** * One synthesized row with its template. */ export interface SynthesizedAnchorAbsorptionRow { raw: string; components: Partial>; locale: string; template: AnchorAbsorptionTemplate; } /** * Builds one row from a sampled or forced template. */ export declare function synthesizeAnchorAbsorptionRow(opts?: AnchorAbsorptionSynthesisOpts): SynthesizedAnchorAbsorptionRow; /** * The template sampling pool, in which each template's repeat count is its weight. */ export declare const ALL_TEMPLATES: ReadonlyArray; //# sourceMappingURL=anchor-absorption.d.ts.map