/** * @copyright Sister Software * @license AGPL-3.0 * @author Teffen Ellis, et al. * * Street-decomposition synthesizer for Stage 3 training. Generates address rows where * `street_prefix`, `street`, and `street_suffix` are emitted as separate BIO spans (instead of * monolithic `street`). Mirrors the PO box synthesizer pattern. * * Why this exists: TIGER/NAD/BAN adapter changes (committed earlier tonight) emit decomposed * components from raw source data, but the v0.4.0 parquet shards on Modal were built BEFORE those * changes. Rebuilding the full corpus requires downloading raw TIGER/NAD/BAN data and re-running * adapters end-to-end — out of scope for a single night shift. This synthesizer takes (locality, * region, postcode) tuples and produces freshly-decomposed Stage 3 training rows, same shape as * the PO box pipeline. * * Note: uses the SAME decomposition logic as TIGER's `decomposeStreet()` so the synthetic * distribution matches what the model would see if/when TIGER shards are rebuilt with the new * adapter. */ import type { CanonicalRow } from "@mailwoman/corpus/types"; export interface StreetBaseTuple { locality: string; region: string; postcode: string; country: string; } export interface SynthesizedStreetRow { raw: string; components: CanonicalRow["components"]; locale: string; } export interface StreetSynthesisOpts { random?: () => number; /** * Probability of emitting house_number alongside the street. Default 0.85. */ includeHouseNumberProb?: number; /** * Probability of emitting the street BARE — no `, City, ST ZIP` tail and no region/locality/ postcode components * (just `street_prefix`/`street`/`street_suffix` + optional `house_number`). Default 0 (preserves the original * full-address behavior exactly, including the RNG sequence). Set >0 to teach the model that a bare `10th Ave` / * `Main St` is a STREET, not a locality — the functional-test failure cluster (bare streets mislabeled `locality`), * the bare-format analogue of the v0.7.x intersection-bare fix. */ bareProb?: number; } /** * Synthesize a US street address with decomposed Stage 3 components. The street is built from PREFIX + NAME + SUFFIX, * then passed through the same `decomposeStreet()` utility the TIGER adapter uses — guarantees the synthetic * distribution matches the canonical decomposition logic. */ export declare function synthesizeStreetRow(base: StreetBaseTuple, opts?: StreetSynthesisOpts): SynthesizedStreetRow | null; //# sourceMappingURL=street.d.ts.map