/** * Lexicon Service * * Provides query expansion using domain-specific synonyms. * Part of Structured Semantic Expansion (SSE) for improved search recall. * * This is a pure domain service with no external dependencies. */ import type { Lexicon, Synonym, ExpandedQuery, ExpansionOptions } from "../entities/lexicon"; import { DEFAULT_EXPANSION_OPTIONS, EXPANSION_WEIGHTS } from "../entities/lexicon"; /** * Default lexicon for programming domain. * * Contains common synonyms for code-related terms. * Grades indicate correlation strength: * - strong: Near-equivalent (function ↔ method) * - moderate: Related but distinct (function ↔ handler) * - weak: Loosely associated (auth ↔ security) */ export declare const DEFAULT_LEXICON: Lexicon; /** * Get synonyms for a term from the lexicon. * * @param term - The term to look up * @param lexicon - The lexicon to use (defaults to DEFAULT_LEXICON) * @returns Array of synonyms with grades, or empty array if not found */ export declare function getSynonyms(term: string, lexicon?: Lexicon): Synonym[]; /** * Expand a query using the lexicon. * * @param query - The original query string * @param lexicon - The lexicon to use (defaults to DEFAULT_LEXICON) * @param options - Expansion options * @returns Expanded query with weights */ export declare function expandQuery(query: string, lexicon?: Lexicon, options?: ExpansionOptions): ExpandedQuery; /** * Get expansion weights by grade (re-exported for convenience). */ export { EXPANSION_WEIGHTS }; /** * Get default expansion options (re-exported for convenience). */ export { DEFAULT_EXPANSION_OPTIONS };