Class: Twilio::REST::Intelligence::V3::RuleExecutionList::ExtractionResultResultEntities

Inherits:
Object
  • Object
show all
Defined in:
lib/twilio-ruby/rest/intelligence/v3/rule_execution.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(payload) ⇒ ExtractionResultResultEntities

Returns a new instance of ExtractionResultResultEntities.



96
97
98
99
# File 'lib/twilio-ruby/rest/intelligence/v3/rule_execution.rb', line 96

def initialize(payload)
        @text = payload["text"]
        @label = payload["label"]
end

Instance Attribute Details

#labelObject

Parameters:

  • : (text)

    [String] The actual text of the extracted entity as it appears in the Conversation.

  • : (label)

    [String] The label for the extracted entity (e.g., PERSON, LOCATION).



95
96
97
# File 'lib/twilio-ruby/rest/intelligence/v3/rule_execution.rb', line 95

def label
  @label
end

#textObject

Parameters:

  • : (text)

    [String] The actual text of the extracted entity as it appears in the Conversation.

  • : (label)

    [String] The label for the extracted entity (e.g., PERSON, LOCATION).



95
96
97
# File 'lib/twilio-ruby/rest/intelligence/v3/rule_execution.rb', line 95

def text
  @text
end

Instance Method Details

#to_json(options = {}) ⇒ Object



100
101
102
103
104
105
# File 'lib/twilio-ruby/rest/intelligence/v3/rule_execution.rb', line 100

def to_json(options = {})
{
        "text": @text,
        "label": @label,
}.to_json(options)
end