/** * @copyright Sister Software * @license AGPL-3.0 * @author Teffen Ellis, et al. * * Assemble a balanced (address → country) dataset for the #244 coarse-placer from the v0.5.0 * corpus. STRATIFIED: a flat random sample is 94% US+FR, so we sample up to N rows PER country * and union. * * Two gotchas this handles: * * - DuckDB `USING SAMPLE n ROWS` samples the TABLE, then WHERE filters the sample — so we * filter-THEN-sample in a subquery to get a true per-country sample. * - The corpus val/test shards only carry US/FR/DE, so we draw ALL splits from the rich `train` * shards and do our OWN per-country 80/10/10 split (dedup on raw → no row crosses splits). * * Run: `mailwoman placer build-dataset [--per-country 50000]` Output: * `/data/coarse-placer/{train,val,test}.jsonl` (rows: {raw, country}) */ /** * Options for {@linkcode buildDataset}. */ export interface BuildDatasetOptions { /** * Rows sampled per country. Default 50000. */ perCountry?: number; /** * Dataset output dir. Default `/data/coarse-placer`. */ data?: string; } /** * Result of {@linkcode buildDataset}. */ export interface BuildDatasetResult { outDir: string; train: number; val: number; test: number; } /** * Coarse-placer dataset builder — see the module doc. */ export declare function buildDataset(options?: BuildDatasetOptions, report?: (line: string) => void): Promise; //# sourceMappingURL=build-dataset.d.ts.map