/** * Historical Name Mappings * * Maps modern placenames to historical alternatives for search suggestions. * Enhanced with GHAP integration for place names and curated data for organisations. * Does not auto-expand queries - provides suggestions only. * @module core/search/names */ export interface NameSuggestion { /** Modern name found in query */ modern: string; /** Historical alternatives */ historical: string[]; /** Suggestion text for user */ suggestion: string; } /** Entity type for name lookups */ export type EntityNameType = 'place' | 'organisation' | 'person'; /** Historical name with period and context */ export interface HistoricalNameInfo { /** Historical name variant */ name: string; /** Time period when this name was used */ period: { from: number; to: number; }; /** Context explaining why/when this name was used */ context: string; } /** Enhanced name suggestions with metadata */ export interface NameSuggestions { /** Canonical/modern name */ canonical: string; /** Historical name variants with periods */ historicalNames: HistoricalNameInfo[]; /** Alternative spellings (e.g., colour/color) */ alternativeSpellings: string[]; /** All terms to use in searches */ searchTerms: string[]; /** Data source for these suggestions */ source: 'ghap' | 'curated' | 'both'; } /** * Find historical name suggestions for a query. * * @param query - Search query string * @returns Array of name suggestions */ export declare function findNameSuggestions(query: string): NameSuggestion[]; /** * Get the appropriate historical name for a year. * * @param modern - Modern placename * @param year - Target year * @returns Historical name for that era, or modern name */ export declare function getHistoricalName(modern: string, year: number): string; /** * Get all known historical names for a place. * * @param modern - Modern placename * @returns All historical alternatives */ export declare function getHistoricalNames(modern: string): string[]; /** * Check if a query contains any mappable modern names. * * @param query - Search query string * @returns true if suggestions available */ export declare function hasNameSuggestions(query: string): boolean; /** * Query GHAP for historical name variants of a place. * Uses fuzzy search to find potential matches. * * @param name - Place name to look up * @returns Historical name variants from GHAP */ export declare function getHistoricalNamesFromGHAP(name: string): Promise; /** * Get comprehensive historical name information for an entity. * Combines GHAP lookup (for places) with curated data (for organisations). * * @param name - Entity name to look up * @param type - Type of entity (place, organisation, person) * @param dateRange - Optional date range to filter by * @returns Complete name suggestions with all variants */ export declare function getHistoricalNameInfo(name: string, type: EntityNameType, dateRange?: { from?: number; to?: number; }): Promise; /** * Generate all search terms from name suggestions. * Combines canonical name, historical variants, and alternative spellings. * * @param suggestions - Name suggestions object * @returns Array of all terms to use in searches */ export declare function generateSearchTerms(suggestions: NameSuggestions): string[]; //# sourceMappingURL=names.d.ts.map