/** * @copyright Sister Software * @license AGPL-3.0 * @author Teffen Ellis, et al. * * OpenAddresses Latin-off-map outlier exposure for the #244 coarse-placer (milestone 3, breadth). * The successor to build-outlier-latin.ts (Overture): Overture's ALPHA addresses theme only * carries real rows for ~7 off-map countries, so a model trained on them MEMORIZED rather than * learned an "off-map" boundary (night-15 finding). OpenAddresses covers far more countries — * this assembles address strings from OA's per-country CSVs and appends them as `country: * "OTHER"`. * * Discipline (per the #244 scoping note + DeepSeek consult): * * - LEAVE-ONE-LANGUAGE-FAMILY-OUT, not random: whole families are held out (Nordic, Baltic, …) so a * trained sibling's shared n-grams can't rescue the generalization metric. TRAIN families * feed train/val/test(indist); HELDOUT families go ONLY to the dedicated test file. * - Schema variance: read via DuckDB read_csv_auto(..., union_by_name) so differing per-source OA * schemas align; assemble to the SAME format the in-map rows use (build-outlier-latin's * assemble). * - Dedup (per country) + per-country CAP (downsample): PL/CZ dwarf others, so cap so OTHER isn't * "mostly Polish". * - Country filter: only OFF-MAP countries (never the 11 in-map); the in-map test.jsonl is untouched. * * Run AFTER build-dataset + the exposure outliers (it APPENDS). Re-runnable: rewrites the * dedicated test file and appends fresh OTHER rows — rebuild train/val before re-running. * * Run: `mailwoman placer build-dataset --outliers oa --oa-dir [--per-country * 6000]` */ /** * Options for {@linkcode buildOutlierOA}. */ export interface BuildOutlierOAOptions { /** * Extracted OpenAddresses root. Default `$MAILWOMAN_DATA_ROOT/openaddresses/extracted`. */ oaDir?: string; /** * Row cap per off-map country. Default 6000. */ perCountry?: number; /** * Dataset dir the OTHER rows append to. Default `/data/coarse-placer`. */ data?: string; } /** * Result of {@linkcode buildOutlierOA}. */ export interface BuildOutlierOAResult { train: number; val: number; test: number; trainCountries: number; heldoutCountries: number; } /** * Coarse-placer OpenAddresses Latin-off-map outlier builder — see the module doc. */ export declare function buildOutlierOA(options?: BuildOutlierOAOptions, report?: (line: string) => void): Promise; //# sourceMappingURL=build-outlier-oa.d.ts.map