/** * @copyright Sister Software * @license AGPL-3.0 * @author Teffen Ellis, et al. * * @file Surface-form primitives for the sub-venue lexicon: the normalizer every phrase passes * through, the phrase → record index built over the surfaces accumulated so far, and the operator * that decides whether a feature's name contains a known designator. * * The two matching rules here are script-conditional, and both narrowings are required — see * {@link NON_SPACING_SCRIPT} and {@link nameContainsSurfaces}. */ import type { SubVenueSurface } from "#tools/sub/venue/table"; /** * Normalize a surface for the table: trim, collapse internal whitespace, and lowercase ONLY when the string is entirely * in a bicameral script. `ターミナルビル` and `航站楼` pass through untouched; `Flughafenterminal` folds. */ export declare function normalizeSurface(text: string): string; /** * A phrase → record index, keyed on the normalized phrase. Built by {@link buildSurfaceIndex} from the surfaces present * before the harvest runs, and the reason a matched phrase can be attributed to the record it actually names. */ export type SurfaceIndex = ReadonlyMap; /** * Index the surfaces accumulated so far by phrase. First writer wins, so a seed record beats a Wikidata alias that * happens to collide — `terminal` stays the `terminal` designator even though it is also an Italian alias for it. */ export declare function buildSurfaceIndex(surfaces: readonly SubVenueSurface[]): SurfaceIndex; /** * Every known phrase found in `name`, as whole-token runs for spacing scripts and as substrings for non-spacing ones. * * Token-boundary matching for Latin script, not substring: `Nordterminal` is a real German compound in which `terminal` * is a suffix, and a substring test would also fire on `Terminalstraße`. The compound case is a genuine miss and it is * the right miss — admitting suffix matches would fire on every `-hall`/`-gate` compound in Germanic and Nordic street * naming, which is exactly the confound class `Briggate`/`Kirkgate` represents. * * For Han/Kana names that rule finds nothing at all, because the script has no word boundaries: `第1ターミナル` splits into * one token that matches no surface. There the LONGEST known substring is the correct operator, and the compound * objection does not transfer — Japanese has no `-gate` street-name suffix class. */ export declare function nameContainsSurfaces(name: string, index: SurfaceIndex): string[]; //# sourceMappingURL=surfaces.d.ts.map