/** * @copyright Sister Software * @license AGPL-3.0 * @author Teffen Ellis, et al. * * @file Surface-form primitives for the sub-venue lexicon. They normalize phrases and index records by phrase. * They also decide whether a feature name contains a known designator. * * The two matching rules depend on script. Both narrowings are required. */ import type { SubVenueSurface } from "#subvenue/table"; /** * Normalize a surface for the table by trimming, collapsing internal whitespace, * then lowercasing only when the string is entirely in a bicameral script. */ export declare function normalizeSurface(text: string): string; /** * A phrase-to-record index keyed by the normalized phrase. * It attributes a matched phrase to its record. */ 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. */ 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. * * Latin matching is token-bounded rather than substring, so `Nordterminal` is a deliberate miss. * Han and Kana have no word boundaries, so the longest known substring is the correct operator there. */ export declare function nameContainsSurfaces(name: string, index: SurfaceIndex): string[]; //# sourceMappingURL=surfaces.d.ts.map