/** * Natural language feedback processor for extracting ratings and insights from user feedback. */ import { IFeedbackProcessor, ProcessedFeedback } from '../types/elements/index.js'; export declare class FeedbackProcessor implements IFeedbackProcessor { private readonly MAX_FEEDBACK_LENGTH; private readonly suggestionPatterns; private readonly sentimentPatterns; private readonly featureKeywords; private readonly issueKeywords; constructor(); /** * Process natural language feedback into structured data. */ process(feedback: string): Promise; /** * Analyze sentiment from text. */ analyzeSentiment(text: string): Promise<'positive' | 'negative' | 'neutral'>; /** * Infer numeric rating from text. * FIX: Use SafeRegex for DOS protection (PR #1187) */ inferRating(text: string): Promise; /** * Extract improvement suggestions from feedback. * FIX: DOS protection via input length limiting (PR #1187, Issue #1181) */ extractSuggestions(text: string): Promise; /** * Extract entities (features, issues, etc.) from feedback. */ private extractEntities; /** * Extract meaningful keywords from feedback. */ private extractKeywords; /** * Calculate pattern weight based on context. */ private getPatternWeight; /** * Calculate relevance of a keyword in context. * * FIX: ReDoS vulnerability - escape user input before using in RegExp * Previously: Used keyword directly in RegExp which could cause ReDoS * Now: Properly escapes special regex characters AND uses SafeRegex * SonarCloud: Resolves DOS vulnerability hotspot (PR #1187) */ private calculateRelevance; /** * Calculate confidence in the analysis. */ private calculateConfidence; /** * Calculate how strongly sentiment is expressed. */ private calculateSentimentStrength; /** * Capitalize first letter of sentence. */ private capitalizeSentence; } //# sourceMappingURL=FeedbackProcessor.d.ts.map