import type { PathBuilderLike } from "path-ts"; import { type CJKRecord } from "#cjk/builder"; /** * The corpus source of the register's rows. */ export declare const JP_REGISTRY_SOURCE = "houjin-jp"; /** * The hold-out bucket from which a Japanese municipality is a board unit: buckets 97 to 99 of 100. */ export declare const JP_BOARD_BUCKET_MIN = 97; /** * 丁目番地等 split into district, chōme, number and remainder, at the leftmost numeral * whose prefix is a district the register lists and whose tail parses as a chōme * and then a number, or `null` when none does. * * A district name may hold a kanji numeral (`一条通北2丁目3-25`), so every numeral position is tried in order. */ export declare function splitTypedStreet(street: string, districts: ReadonlySet): readonly [district: string, chome: string, number: string, rest: string] | null; /** * The districts Overture lists under each (prefecture, municipality), * from the parquet the label corpus reads. */ export declare class JPKeyIndex { readonly districtsByUnit: Map>; /** * The districts listed under one unit, if any. */ districts(prefecture: string, municipality: string): ReadonlySet | undefined; /** * Builds the index from an Overture-JP parquet file, or from its first `maxRowGroups` row groups. * * @throws When the file is missing. */ static fromParquet(parquet: PathBuilderLike, maxRowGroups?: number): Promise; } /** * One corporation with a domestic address. */ export interface CorporateRow { name: string; kind: string; prefecture: string; municipality: string; street: string; postcode: string; } /** * Streams the nationwide CSV out of its zip, one row per corporation with all three address fields. * * @throws When the zip is missing, naming it, or holds no CSV member. */ export declare function iterCorporateRows(zipPath: PathBuilderLike): AsyncGenerator; /** * A register row rendered and spanned. */ export interface JPAligned { raw: string; span_starts: number[]; span_ends: number[]; span_tags: string[]; register: string; prefecture: string; municipality: string; } /** * The three fields rendered as the one line a person types, with spans placed on it, * or `null` when they do not align. */ export declare function alignCorporateRow(row: CorporateRow, index: JPKeyIndex, withPostcode?: boolean): JPAligned | null; /** * An aligned row as a corpus record. * * Each whitespace token is labeled with the span it starts in. */ export declare function jpRegistryRecord(aligned: JPAligned): CJKRecord; //# sourceMappingURL=registers.d.ts.map