Documentation
¶
Overview ¶
Package semantic provides lightweight NLP intent analysis for user queries.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Analyzer ¶
type Analyzer struct {
KeywordWeights KeywordWeights
ContextPatterns ContextPatterns
ServiceMapping ServiceMapping
IntentSignals IntentSignals
UrgencyKeywords UrgencyKeywords
TimeFrameWords TimeFrameWords
}
Analyzer keeps lightweight lexical resources used during semantic classification.
func NewAnalyzer ¶
func NewAnalyzer() *Analyzer
func (*Analyzer) AnalyzeQuery ¶
func (sa *Analyzer) AnalyzeQuery(query string) model.QueryIntent
AnalyzeQuery performs a purely lexical pass that classifies the user's question without calling external NLP services. It scores intent by summing word weights, infers urgency and timeframe from keyword buckets, tags cloud services via the mapping table, and fills in likely data types so downstream planners can quickly decide which collectors to run.
type ContextPatterns ¶
ContextPatterns groups workflow-specific hint words (monitoring vs troubleshooting, etc.).
type IntentSignals ¶
IntentSignals describes per-intent weights used during scoring.
type KeywordWeights ¶
KeywordWeights biases confidence toward terms that historically correlate with outages.
type ServiceMapping ¶
ServiceMapping tags AWS services based on keywords embedded in the query.
type TimeFrameWords ¶
TimeFrameWords maps colloquial phrases to time windows like historical or recent.
type UrgencyKeywords ¶
UrgencyKeywords help translate user language into urgency buckets.