import type { PathBuilderLike } from "path-ts"; /** * The Overture-JP addresses the corpus reads. */ export declare function jpOvertureParquetPath(): import("path-ts").PathBuilder; /** * Japan Post's KEN_ALL_ROME file. */ export declare function kenAllPath(): import("path-ts").PathBuilder<"~env/data-root/KEN_ALL_ROME/KEN_ALL_ROME.CSV">; /** * The WOF admin database the kana readings come from. */ export declare function jpAdminDBPath(): import("path-ts").PathBuilder<"~env/data-root/db/wof/admin-global-priority.db">; /** * The tier a postcode lookup answered from. */ export type KenAllTier = "town" | "town_aza_stripped" | "municipality" | "miss"; /** * The 〒 join: the town first, the municipality's catch-all only as the fallback. * * KEN_ALL lists the town (大字 or 町) in column 4. * Overture writes the ōaza prefix (`字崎枝`, `大字上田`) that KEN_ALL omits, so a town miss is * retried with a leading 字 or 大字 stripped before the municipality catch-all. */ export declare class KenAllIndex { readonly town: ReadonlyMap; readonly municipality: ReadonlyMap; constructor(town: ReadonlyMap, municipality: ReadonlyMap); /** * The postcode for a district and the tier that answered, or `null` with `miss`. */ lookup(prefecture: string, municipality: string, district: string): readonly [string | null, KenAllTier]; } /** * KEN_ALL_ROME (cp932) read into the two-tier index. * * Columns are postcode, prefecture, city and town in kanji, then romaji. * A town's parenthetical annotation is stripped, and `以下に掲載がない場合` ("if not listed below") * is the municipality catch-all rather than a town. * * @throws When the file is missing, naming it. */ export declare function loadKenAllPostcodes(path: PathBuilderLike): Promise; /** * One eligible source row: prefecture, municipality, street, number, longitude, latitude. */ export type JPSourceRow = readonly [ prefecture: string, municipality: string, street: string, number: string, lon: number | null, lat: number | null ]; /** * Options for {@linkcode iterJPSourceRows}. */ export interface JPSourceRowOptions { maxRowGroups?: number; /** * @defaultValue {@linkcode MAX_FIELD_CHARS} */ maxFieldChars?: number; /** * Counts each dropped row by its reason. */ dropped?: Map; } /** * Every eligible source row, normalized. * * A row is eligible when both admin levels are present with the prefecture * among the 47, its street or number is non-empty, its number holds no comma * (an MLIT parcel aggregation such as `岡山町1154,1153,1155,…`), and its fields total at most * `maxFieldChars` code points, because the character path reads 96 units and would truncate it. * * @throws When the parquet file is missing, naming it. */ export declare function iterJPSourceRows(parquet: PathBuilderLike, options?: JPSourceRowOptions): AsyncGenerator; //# sourceMappingURL=sources.d.ts.map