/** * @copyright Sister Software * @license AGPL-3.0 * @author Teffen Ellis, et al. * * Renders Overture Singapore address rows in the forms that people type, such as HDB block lines and `S(560123)` postcodes. */ import { type CorpusRecipe } from "#recipes/scaffold"; /** * Abbreviates the first street generic that the street contains, such as * `Ang Mo Kio Avenue 3` to `Ang Mo Kio Ave 3`. */ export declare function abbreviateSGStreet(street: string): string; /** * Reports whether the source `unit` value looks like a building name that can lead a line. * * The check rejects `NIL`, single words, values with a digit or parenthesis, plus estate names. */ export declare function isBuildingName(unit: string): boolean; interface SGRow { street: string; number: string; unit: string; postcode: string; } /** * The four typed forms that this recipe renders. */ export type SGRegister = "official" | "block" | "bracket_postcode" | "building_led"; /** * One rendered line with its components, each of which is a substring of `raw`. */ export interface SGRegisterRendering { raw: string; components: Record; register: SGRegister; } /** * Renders one source row in a sampled or requested form. * * All randomness comes from `random`. * A requested `building_led` form falls back to `official` when the row's `unit` is not a building name. * * A requested `block` form falls back to `bracket_postcode` when the row's number is not a block number. * `Blk` and the `S(` and `)` around a postcode stay untagged. */ export declare function renderSGRegister(row: SGRow, random: () => number, register?: SGRegister): SGRegisterRendering; /** * Renders each Overture Singapore corpus row from `--input` once in a sampled typed form. * * The recipe skips rows without a street, a block-style number, or a six-digit postcode. */ export declare const sgRegisterRecipe: CorpusRecipe; export {}; //# sourceMappingURL=register.d.ts.map