/** * @copyright Sister Software * @license AGPL-3.0 * @author Teffen Ellis, et al. * * `street` shard recipe — synthetic street-decomposition rows for Stage 3 (US-only): tuples → * {@link synthesizeStreetRow} → aligned LabeledRow. Ported from scripts/build-street-shard.mjs. */ import { stableSourceID } from "@mailwoman/corpus/adapters/utils" import { synthesizeStreetRow, type StreetBaseTuple } from "@mailwoman/corpus/synthesizers/street" import { alignAndWrite, makeLcg, readTuples, type ShardRecipe } from "./scaffold.ts" /** * Shard 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: ShardRecipe = { 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