import type { SeededRandom } from "@mailwoman/core/math/random"; import type { PathBuilderLike } from "path-ts"; import { type CJKRecord } from "#cjk/builder"; /** * The Overture-TW addresses the corpus reads. */ export declare function twOvertureParquetPath(): import("path-ts").PathBuilder; /** * The label set Taiwanese rows are tagged against. */ export declare const TW_LABEL_SET_NAME = "stage3-cjk"; /** * The corpus source of the rows. */ export declare const TW_CORPUS_SOURCE = "overture-tw"; /** * Each register's weight. * * The sampler renormalizes them over the registers a row can render. */ export declare const TW_REGISTER_WEIGHTS: Map; /** * One eligible source row: region, district, village, street, house number * (with its sub-number), unit, longitude, latitude. */ export type TWSourceRow = readonly [ region: string, district: string, village: string, street: string, houseNumber: string, unit: string, lon: number, lat: number ]; /** * The sub-number at the head of `unit` moved onto `number`, unless `number` already * closes with 號 and the unit continues past it. */ export declare function splitNumberUnit(number: string, unit: string): readonly [number: string, unit: string]; /** * The fields of one row and the draws that decide its surface. */ export interface TWRenderInput { region: string; district: string; village: string; street: string; houseNumber: string; unit: string; register: string; country?: boolean; } /** * One row rendered in one register as a span-labeled corpus record. * * The official register writes full-width digits and the 村里. * Every other register writes ASCII digits. */ export declare function renderTWRow(input: TWRenderInput): CJKRecord; /** * The registers a row can render: `official` only with a 村里, `with_unit` only with a unit. */ export declare function availableTWRegisters(village: string, unit: string): string[]; /** * One of `options`, drawn by {@linkcode TW_REGISTER_WEIGHTS}. * A single option is returned without a draw. */ export declare function chooseTWRegister(rng: SeededRandom, options: readonly string[]): string; /** * {@linkcode verifyRecord} under {@linkcode TW_LABEL_SET_NAME}. */ export declare function verifyTWRecord(record: CJKRecord, tagSet: ReadonlySet): void; /** * Options for {@linkcode iterTWSourceRows}. */ export interface TWSourceRowOptions { maxRowGroups?: number; /** * @defaultValue {@linkcode MAX_FIELD_CHARS} */ maxFieldChars?: number; dropped?: Map; /** * Counts each row's source datasets. * The build report lists them for attribution. */ agencies?: Map; } /** * Every eligible source row, normalized: three admin levels with the first two present, * a street and a number, and no field longer than `maxFieldChars` code points. * * @throws When the parquet file is missing, naming it. */ export declare function iterTWSourceRows(parquet: PathBuilderLike, options?: TWSourceRowOptions): AsyncGenerator; //# sourceMappingURL=rows.d.ts.map