/** * @copyright Sister Software * @license AGPL-3.0 * @author Teffen Ellis, et al. * * `street` slice recipe — synthetic street-decomposition rows for Stage 3 (US-only): tuples → * {@link synthesizeStreetRow} → aligned LabeledRow. Ported from scripts/build-street-slice.mjs. */ import { makeLcg } from "@mailwoman/core/utils" import { stableSourceID } from "#adapters/utils" import { alignAndWrite, readTuples, type CorpusRecipe } from "#recipes/scaffold" import { synthesizeStreetRow, type StreetBaseTuple } from "#synthesizers/street" /** * Slice recipe registered with the corpus builder — see the file header for the parse behaviour it exists to exercise, * and `description` below for the surface form it generates. */ export const streetRecipe: CorpusRecipe = { name: "street", description: "Street-decomposition rows (US): tuples → synthesizeStreetRow → aligned LabeledRow", mode: "tuples", options: [{ flag: "--house-number-prob
", description: "P(emit a house number). Default 0.85" }],
async run(opts, write) {
if (!opts.input) throw new Error("street recipe requires --input