/** * @copyright Sister Software * @license AGPL-3.0 * @author Teffen Ellis, et al. * * Anchor-absorption counter-augmentation (#220/#723, Probe A1). Teaches the model the CONTEXT- * DEPENDENT leading-5-digit disambiguation that the killed #723 override was faking, AND that the * `anchor_paint_mode=shaped` WHERE fix alone over-corrected on (Probe A0: it flipped the default * to house_number, recovering CASE-H but ERODING CASE-P — postcode F1 99.3→86.5 on * leading-postcode rows like "05764 Finel Hollow Road, VT"). * * THE DISCRIMINATOR the model must learn (from the CASE-H vs CASE-P contrast, NOT a flipped * default): * * - A leading 5-digit WITH a trailing postcode + street context → it is the HOUSE NUMBER (CASE-H) * - A leading 5-digit with NO trailing postcode (US-rural / DE) → it IS the POSTCODE (CASE-P) Both * leading tokens are real ZIPs (so the painted anchor fires on both); only the surrounding * context separates them. The model attends to the trailing token to decide the leading one. * * Slice mix (the A0 learning sets a HEAVY CASE-P floor so the default doesn't flip — DeepSeek's * ≥35% CASE-P; here CASE-P total = 35%): H-adversarial 30% US street, leading real-ZIP house# + * TRAILING postcode → house_number P-us-rural 20% US rural, leading postcode, NO trailing → * postcode (the A0-erosion fix) P-de 15% German leading postcode "{pc} {city}, {street} {hn}" → * postcode anchor-fp 10% leading 5-digit that is NOT a real ZIP + trailing postcode → * house_number locale-ambig 15% minimal context; the local token (street-type vs none) decides * standard 10% normal small house# + trailing postcode → house_number (baseline) * * Real ZIPs for the leading-5-digit are sampled from the postcode anchor lookup at build time * (passed via opts.realZips) so the shaped anchor fires on them exactly as at inference; fake * ZIPs (anchor-fp) are 5-digit strings deliberately absent from the lookup. */ import type { ComponentTag } from "@mailwoman/core/types"; export interface AnchorAbsorptionBaseTuple { locality: string; region: string; postcode: string; } export type AnchorAbsorptionTemplate = "h-adversarial" | "h-no-trailing-locality" | "p-us-rural" | "p-de" | "anchor-fp" | "locale-ambig" | "standard"; export interface AnchorAbsorptionSynthesisOpts { random?: () => number; forceTemplate?: AnchorAbsorptionTemplate; /** * Real US ZIPs (in the anchor lookup) to use as the LEADING 5-digit house number — so the painted anchor fires on it, * the CASE-H/anchor-fp trigger. Builder loads these from pilot-anchor-lookup.json. */ realZips?: ReadonlyArray; } export interface SynthesizedAnchorAbsorptionRow { raw: string; components: Partial>; locale: string; template: AnchorAbsorptionTemplate; } /** * Build one anchor-absorption counter-augmentation row. */ export declare function synthesizeAnchorAbsorptionRow(opts?: AnchorAbsorptionSynthesisOpts): SynthesizedAnchorAbsorptionRow; /** * Every anchor-absorption template, in one list for the shard runner to sample from. Each covers a way a venue or * landmark name can swallow the street token that follows it. */ export declare const ALL_TEMPLATES: ReadonlyArray; //# sourceMappingURL=anchor-absorption.d.ts.map