class Natter::Intent
Public: Represents an intent derived by the parser from an utterance.
Attributes
confidence[RW]
How confident the parser is that this is the correct intent (from 0.0 - 1.0).
entities[RW]
An array of entities discovered in the utterance. May be empty.
name[RW]
The string name of this intent.
skill[RW]
The name of the skill that this intent belongs to.
Public Class Methods
new(name, skill = '', confidence = 1.0, entities = nil)
click to toggle source
Public: Constructor.
name - The String name of this intent. Does not have to be unique. skill - The name of the skill that this intent belongs to. Defaults
to the global namespace/skill (default: '')
confidence - Float value between 0-1 reflects how confident the parser is
that this intent is correct (default: 1.0).
entities - An array of Natter::Entity
objects (default: nil).
# File lib/natter/intent.rb, line 21 def initialize(name, skill = '', confidence = 1.0, entities = nil) @name = name @skill = skill @confidence = confidence @entities = entities || [] end