/** * @copyright Sister Software * @license AGPL-3.0 * @author Teffen Ellis, et al. * * The Korean permit registry (지방행정인허가데이터) as an `observation` source. It reads the delivered * CSVs and turns an aligned string into a corpus row. * * 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. The adapter separates reading 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 stored on every row from this adapter. * Configs use this label as the `source_weights` key. */ 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 corpus schema. * * The token labels are derived from the spans rather than stored beside them: * a token is `B-` when its first character falls inside a span, `O` otherwise. * A span covering several tokens labels only the token where it starts. * The char-path trainer reads this label from each span. */ export declare function alignedToCJKRow(aligned: Aligned): Record; //# sourceMappingURL=permit-rows.d.ts.map