UNPKG

apple-hig-mcp

Version:

High-performance MCP server providing instant access to Apple's Human Interface Guidelines via hybrid static/dynamic content delivery

44 lines 1.38 kB
/** * Enhanced Keyword Search Service * * Provides improved search functionality without requiring TensorFlow. * Uses advanced keyword matching, stemming, and relevance scoring. */ import type { SearchResult, ApplePlatform, HIGCategory } from '../types.js'; export interface EnhancedSearchConfig { maxResults: number; minScore: number; exactMatchBoost: number; titleBoost: number; keywordBoost: number; platformBoost: number; categoryBoost: number; } export declare class EnhancedKeywordSearchService { private config; private readonly defaultConfig; private readonly synonyms; private readonly commonWords; constructor(config?: Partial<EnhancedSearchConfig>); /** * Enhanced search with synonym expansion and better relevance scoring */ search(query: string, sections: any[], platform?: ApplePlatform, category?: HIGCategory): Promise<SearchResult[]>; /** * Expand query with synonyms for better matching */ private expandQueryWithSynonyms; /** * Tokenize query into meaningful search terms */ private tokenizeQuery; /** * Calculate comprehensive relevance score */ private calculateRelevanceScore; /** * Generate highlights for search results */ private generateHighlights; } //# sourceMappingURL=enhanced-keyword-search.service.d.ts.map