/** * Natural Query Preprocessing * * Parses conversational queries and extracts semantic information like: * - Topic/keywords * - Time hints (last week, in November, recently) * - Module hints * - Question type */ export interface TimeRange { since?: Date; until?: Date; description: string; } export type QuestionType = "what" | "when" | "why" | "how" | "general"; export interface NaturalQuery { originalText: string; extractedTopic: string; timeHints: TimeRange | null; moduleHints: string[]; questionType: QuestionType; isConversational: boolean; } /** * Detect if a query is conversational (natural language question vs keyword search) */ export declare function isConversationalQuery(text: string): boolean; /** * Detect question type from query text */ export declare function detectQuestionType(text: string): QuestionType; /** * Extract time hints from query text */ export declare function extractTimeHints(text: string): TimeRange | null; /** * Extract module hints from query text * Simple keyword matching for common module-related terms */ export declare function extractModuleHints(text: string): string[]; /** * Clean and extract topic from conversational query */ export declare function cleanQuery(text: string): string; /** * Parse natural language query into structured information */ export declare function parseNaturalQuery(text: string): NaturalQuery;