/** * @copyright Sister Software * @license AGPL-3.0 * @author Teffen Ellis, et al. * * `wof-admin-jp`: Japanese admin-hierarchy adapter. * * PROTOTYPE — not yet wired into the Stage 3 training corpus. Demonstrates the JP address shape and * synthesizes BIO-labeled training rows from the global WOF SQLite. * * JP addresses differ from US/EU in three ways: * * 1. **Reversed ordering** — region → county → locality → block → house_number "東京都世田谷区南町1-2-3" not * "1-2-3 Minamicho, Setagaya, Tokyo" * 2. **No street names** — most JP addresses use a block/sub-block grid system. The "neighbourhood" * placetype (丁目) is the closest analog to a street but is actually a grid cell. * 3. **Postcode-first convention** — addresses are often prefixed with `〒NNN-NNNN`. * * Schema mapping to ComponentTags (subset of Stage 3 + JP-specific Phase 6 tags): * * | JP concept | WOF placetype | ComponentTag (Phase 6) | * |-----------------|--------------------|-----------------------| | 都道府県 (prefecture) | region | * region (or prefecture) | | 市区町村 (city/ward) | county/locality | locality (or municipality) | | * 丁目 (chome) | neighbourhood | block (Phase 6 tag) | | 番地 (banchi) | (synth) | sub_block | | 号 * (gō) | (synth) | house_number | | 〒 (postcode prefix) | — | postcode | * * This adapter currently emits only the admin chain (region → locality → block). House numbers and * sub-blocks require a different data source (JP postcode database or real-world address dumps * from MLIT/JapanPost). */ import type { CanonicalRow, CorpusAdapter } from "@mailwoman/corpus/types"; /** * Registry id for this adapter. Stamped into every row it emits, so a corpus record can be traced back to the dataset * it came from. */ export declare const WOF_ADMIN_JP_ADAPTER_ID = "wof-admin-jp"; interface PlaceRow { id: number; name: string; placetype: string; parent_id: number; country: string; } /** * Synthesize a JP address from a hierarchy chain. * * Format: `〒? ?` * * No house numbers yet — needs MLIT data. */ export declare function synthesizeJpAddress(chain: PlaceRow[], jpnNames: Map): { raw: string; components: CanonicalRow["components"]; } | null; /** * Build the JP adapter. Reads from the unified global WOF SQLite, walks admin chains starting from neighbourhoods, and * yields canonical rows. */ export declare function createWOFAdminJpAdapter(): CorpusAdapter; /** * The configured adapter instance registered with the corpus builder. */ export declare const wofAdminJpAdapter: CorpusAdapter; export {}; //# sourceMappingURL=adapter.d.ts.map