/** * @copyright Sister Software * @license AGPL-3.0 * @author Teffen Ellis, et al. * * The Korean permit registry (지방행정인허가데이터) as a NOISY corpus source: reading the delivered CSVs, and turning * an aligned string into a corpus row (#2204 §5). * * The publisher delivers CP949, one file per business category, with both address systems typed by a clerk plus a * planar coordinate in EPSG:5174 and both postcodes. Reading is separated from ALIGNING so the alignment rate per * file can be measured before any row enters a corpus. */ import { type PathBuilderLike } from "path-ts"; import type { Aligned } from "#kr/adapters/localdata/align"; /** * The source label every row of this adapter carries, and the name a config's `source_weights` addresses it by. */ export declare const SOURCE = "localdata-kr"; /** * Every permit in this registry is Korean; the publisher issues no others. */ export declare const COUNTRY = "KR"; /** * The 영업상태명 of a business still trading. A closed one's address records somewhere that was. */ export declare const OPEN_STATUS = "\uC601\uC5C5/\uC815\uC0C1"; /** * One permit, with both address systems as the clerk typed them. */ export interface PermitRow { /** * The file's basename: the business category the publisher splits by. */ category: string; name: string; status: string; roadAddress: string; lotAddress: string; roadPostcode: string; lotPostcode: string; x: number | null; y: number | null; } export interface ReadPermitOptions { /** * Keep only these 영업상태명 values. Empty admits every status. */ statuses?: readonly string[]; } /** * Stream every permit of one CSV. */ export declare function readPermitFile(path: PathBuilderLike, options?: ReadPermitOptions): AsyncGenerator; /** * Stream every permit of every CSV in a directory, in filename order. */ export declare function readPermitDirectory(directory: PathBuilderLike, options?: ReadPermitOptions): AsyncGenerator; /** * One aligned string as a row in the CJK slice schema. * * The token labels are derived from the spans rather than carried beside them: a token is `B-` when its FIRST * character falls inside a span, `O` otherwise. A span covering several tokens therefore labels only the token it * starts in, which is what the char-path trainer reads the spans for. */ export declare function alignedToSliceRow(aligned: Aligned): Record; //# sourceMappingURL=permit-rows.d.ts.map