class
NoirAIContext::PatternDefinition
- NoirAIContext::PatternDefinition
- Reference
- Object
Overview
Declarative detection rule shared by every catalog in Patterns.
A rule pairs a #kind label (the AIContextEntry kind it raises) with
two regex sets: #name_patterns match against a callee / parameter
name, #source_patterns match against a source snippet. When either
set hits, the matcher emits an entry of #kind at #confidence.
Defined in:
ai_context/pattern_definition.crConstructors
Instance Method Summary
- #confidence : Int32
- #description : String
- #kind : String
- #name_patterns : Array(Regex)
- #source_patterns : Array(Regex)
Constructor Detail
def self.new(kind : String, description : String, confidence : Int32, *, name_patterns : Array(Regex) = [] of Regex, source_patterns : Array(Regex) = [] of Regex)
#