/** * @copyright Sister Software * @license AGPL-3.0 * @author Teffen Ellis, et al. * * `bare-postcode` — a postcode standing ALONE, in the form its country writes. * * The shape is absent from the corpus. A census of the 685,187,151 rows the v0.29.0 mixture reads * found ZERO two-token rows of `NNN NN` and one of `NNNN LL`, so `100 00` and `1012 LG` are out of * distribution and every model's answer for them is generalization off longer lines. That * generalization is what moved: held-out CZ/SK codes read 31/32 as a postcode under v5.0.0, v5.2.0 * AND v5.3.0 — a seed pair agreeing, so not training noise — and 0/32 under v5.4.0, whose added * OpenStreetMap PK/BD/VN rows raise the leading-digit-is-a-house-number evidence at that opening * from 393 to 444 samples per epoch. * * Neither existing repair reaches it. `nl-postcode` and `cz-pcfirst-preposition` teach the same * postcodes IN CONTEXT — every row they emit carries a street, a number and a city — and the * 12,759 in-context `NNN NN` rows do not transfer to the bare input. The deterministic half, * `buildEmissionPriors`, caps near 0.95 at the default `biasScale` against a measured 1.67-to-3.78 * nat deficit. * * So this recipe emits the postcode and NOTHING else, which is the one thing no sibling does. * * VERIFIED AGAINST THE PRIOR, NOT MERELY MATCHED TO IT. Every surface is run through * `detectKnownFormats` and refused unless the detector calls it a postcode. The recipe's rendering * table and `known-formats.ts`'s patterns have to agree, and matched constants would not prove * they do — the trained surface and the prior that boosts it come from one check. */ import { type CorpusRecipe } from "#recipes/scaffold"; /** * Choose distinct postcodes without inheriting the publisher's row order. * * Sorting first makes the result independent of input-file order; the seeded sample then gives a reproducible spread * across the complete set instead of taking the first municipality or numeric prefix that happens to fill the cap. */ export declare function selectPostcodes(codes: Iterable, limit: number, seed: number): string[]; /** * Return every required input path that is absent, preserving declaration order for diagnostics. */ export declare function findMissingPostcodeSources(paths: readonly string[], exists?: (path: string) => Promise): Promise; /** * Every surface a country writes for one postcode, spaced form first, or `[]` when this recipe carries no form for that * country or the code does not fit the one it carries. * * Exported because it is the half of the recipe a test can reach: `run` reads a 500 MB archive from the data root, and * the contract worth pinning — that every surface this renders is one {@linkcode detectedAsPostcode} accepts — needs * neither. */ export declare function renderBarePostcode(country: string, postcode: string): string[]; /** * Whether `known-formats.ts` reads this surface as a postcode across its whole span. * * A surface the detector does not recognize would train the model on a string the query-shape prior cannot then * support, which is the divergence this recipe exists to close rather than widen. */ export declare function detectedAsPostcode(surface: string): boolean; /** * Slice recipe registered with the corpus builder — see the file header for the parse behaviour it exists to exercise, * and `description` below for the surface form it generates. */ export declare const barePostcodeRecipe: CorpusRecipe; //# sourceMappingURL=index.d.ts.map