/** * @copyright Sister Software * @license AGPL-3.0 * @author Teffen Ellis, et al. * * `sg-register` slice recipe — the forms a person in Singapore types, rendered over the Overture-SG register rows * (#2204 §4). The base `overture` source carries the register's own shape, `990 OLD CHOA CHU KANG ROAD, 699814, * Singapore`, and the Latin model has no register for the three forms that dominate typed Singapore addresses: * * - the HDB block line, `Blk 123 Ang Mo Kio Ave 3 #05-67 Singapore 560123` — `Blk` in front of the block number (the * register's `number`), a floor-unit `#NN-NN` after the street, the country name as the locality; * - the bracketed postcode, `123 Ang Mo Kio Ave 3 S(560123)` — the form the postal service prints; * - the building-led line, `National Shooting Centre, 990 Old Choa Chu Kang Road, Singapore 699814` — the register's * `unit` field holds the BUILDING or ESTATE name on 91,818 of 142,210 rows, which the adapter refuses as a unit and * this recipe renders as a `venue` when it reads as a building rather than an estate. * * Every value in `components` is a verbatim substring of `raw`, aligned by {@link alignAndWrite}. The floor-unit is * SYNTHESIZED (the register carries one on a single row): floor 01–30, unit 01–399, zero-padded — the shape, not a * real occupancy. `Blk` and the `S(` `)` around a postcode are untagged, as the board's `sg-cs-blk-12-kallang-ave` * row expects (`house_number: "12"`). Streets arrive upper-case and are rendered title-cased; a third abbreviate the * generic (`Avenue` → `Ave`, `Road` → `Rd`, …) the way a typed line does. * * Run: mailwoman corpus slice sg-register --input --count N --seed S */ import { type CorpusRecipe } from "#recipes/scaffold"; /** * `OLD CHOA CHU KANG ROAD` → `Old Choa Chu Kang Road`; an already-mixed value is returned as it is. The register writes * every street and building name upper-case, the same convention as G-NAF, so the G-NAF title-caser serves both. */ export declare function titleCaseSGName(name: string): string; /** * Abbreviate the street's generic, wherever it sits (`Ang Mo Kio Avenue 3` → `Ang Mo Kio Ave 3`). */ export declare function abbreviateSGStreet(street: string): string; /** * Whether the register's `unit` value names a building rather than an estate — the building-led register's lead. A name * carrying a digit, a parenthesized abbreviation (`DIABETES & METABOLISM CENTRE (DMC)`) or one word only is not one. */ export declare function isBuildingName(unit: string): boolean; interface SGRow { street: string; number: string; unit: string; postcode: string; } /** * The four typed forms this recipe renders. */ export type SGRegister = "official" | "block" | "bracket_postcode" | "building_led"; /** * One rendered register: the raw line plus the components it carries, every value a substring of the line. */ export interface SGRegisterRendering { raw: string; components: Record; register: SGRegister; } /** * Render one register form for one register row. Pure: every random draw comes through `random`. A `register` names the * form to render instead of drawing one, for a board that wants a balanced spread; `building_led` still needs a * building-shaped `unit` and falls back to `official` without one. */ export declare function renderSGRegister(row: SGRow, random: () => number, register?: SGRegister): SGRegisterRendering; /** * Slice recipe registered with the corpus builder — see the file header for the registers and why each is here. */ export declare const sgRegisterRecipe: CorpusRecipe; export {}; //# sourceMappingURL=register.d.ts.map