/** * @copyright Sister Software * @license AGPL-3.0 * @author Teffen Ellis, et al. * * No-street address synthesizer — the counter-distribution that v0.6.1's synth-street shard is * missing. Generates BIO-labelable rows where there is NO street, NO house_number, NO * street_prefix, NO street_suffix, NO intersection — only some subset of {venue, locality, * region, postcode, country}. * * Rationale: the [2026-05-28 night-2 * postmortem](../../docs/articles/evals/night-shifts/2026-05-28-night-2-postmortem.md) and the [layer-1 * eval](../../docs/articles/evals/experiments/2026-05-28-layer-1-morphology-fst.md) showed that synth-street * pushed the model into a high-confidence "decompose mode" that leaked into `dependent_locality`. * Per DeepSeek's turn-2 recipe, the model needs explicit counter-examples: addresses where the * model should NOT emit street labels. This synthesizer is that source. * * Six row templates, each producing a {raw, components} pair with no street-side tags: * * 1. **Plain venue + locality + region + postcode** `"Bob's Pizza, Boston, MA 02101"` * 2. **Adversarial venue (containing street-typing words)** `"Wall Street Industries, NY 10005"`, * `"5th Avenue Theater, Seattle, WA"`, `"Highway 61 Diner, Memphis TN"`. These are the rows * that v0.6.1's decompose-mode would mis-tag as street_prefix/suffix; explicit negative * training kills that signal. * 3. **Locality + region + postcode (minimal)** — `"Boston, MA 02101"` * 4. **Locality + region** — `"Boston, MA"` * 5. **Postcode-only** — `"02101"` * 6. **Country-only** — `"United States"`, `"France"` (rare in real data, but the model has seen these * and should not hallucinate streets on them). * * Output is a `CanonicalRow` with no street-side components. Alignment will produce BIO labels * where every token is one of {`B-venue`, `I-venue`, `B-locality`, `I-locality`, `B-region`, * `B-postcode`, `B-country`, `I-country`, `O`} — explicitly never any street tag. That IS the * counter-example signal the model is missing. * * This complements (does not replace) the existing US-base-tuple source used by * `po-box.ts`; the same `NoStreetBaseTuple` shape is consumed. */ import type { CanonicalRow } from "@mailwoman/corpus/types"; export interface NoStreetBaseTuple { locality: string; region: string; postcode: string; country: string; } export type NoStreetTemplate = "venue-plain" | "venue-adversarial" | "locality-region-postcode" | "locality-region" | "postcode-only" | "country-only"; export interface NoStreetSynthesisOpts { random?: () => number; /** * Override the template selection entirely (used by tests for deterministic coverage). */ forceTemplate?: NoStreetTemplate; } export interface SynthesizedNoStreetRow { raw: string; components: CanonicalRow["components"]; locale: string; template: NoStreetTemplate; } /** * Generate one no-street counter-example row for a base (locality, region, postcode, country) tuple. Picks a template * by weighted random; the venue templates are the critical counter-distribution against synth-street's decompose-mode * pressure. */ export declare function synthesizeNoStreetRow(base: NoStreetBaseTuple, opts?: NoStreetSynthesisOpts): SynthesizedNoStreetRow | null; /** * Convenience: assert at type-level that a synthesized row carries no street-side components. Used by tests + * downstream consumers who want to verify the contract at runtime. */ export declare const STREET_SIDE_TAGS: readonly ["street", "street_prefix", "street_prefix_particle", "street_suffix", "house_number", "intersection_a", "intersection_b", "unit"]; export declare function hasAnyStreetSideTag(components: CanonicalRow["components"]): boolean; //# sourceMappingURL=no-street.d.ts.map