/** * @copyright Sister Software * @license AGPL-3.0 * @author Teffen Ellis, et al. * * Assemble a sampled, component-labeled Australian address set from G-NAF (the Geocoded National * Address File, Geoscape Australia, Open G-NAF license). Any derived artifact must attribute * "Geoscape Australia". G-NAF is a relational PSV distribution whose street address reconstructs * by joining ADDRESS_DETAIL (number, postcode, the PIDs) to STREET_LOCALITY (street name and type) * and then to locality (suburb). State is the per-file prefix (ACT/NSW/…). * * The two lookup tables load as Maps. ADDRESS_DETAIL streams once and is reservoir-sampled, so * memory stays bounded. * * No coordinates. The output feeds the parser. The parser needs the address string and its component * labels. Output is component tuples as jsonl. An optional held-out eval set is excluded by * (street, locality, postcode) so the training corpus never overlaps the benchmark. */ import { type PathBuilderLike } from "path-ts"; export interface GNAFAssembleOptions { /** * G-NAF `Standard` directory (holds the per-state `*_psv.psv` tables). */ standardDir: PathBuilderLike; /** * Target sample size (uniform reservoir → population-proportional across states). */ sampleSize: number; /** * Output jsonl path. */ out: string; /** * Optional held-out eval jsonl (rows with a `components` field) — * its (street,locality,postcode) are excluded. */ holdoutPath?: string; /** * Progress sink (the CLI passes a setter). */ onProgress?: (message: string) => void; } export interface GNAFAssembleResult { written: number; seen: number; heldOut: number; byState: Record; } /** * Holdout/dedup key: a street within a locality+postcode (house-number-agnostic — conservative). */ export declare function gnafHoldoutKey(street: string, locality: string, postcode: string): string; export declare function assembleGNAF(opts: GNAFAssembleOptions): Promise; //# sourceMappingURL=assemble.d.ts.map