You are viewing documentation for version 3 of the AWS SDK for Ruby. Version 2 documentation can be found here.

Class: Aws::Comprehend::Types::DetectSentimentRequest

Inherits:
Struct
  • Object
show all
Defined in:
gems/aws-sdk-comprehend/lib/aws-sdk-comprehend/types.rb

Overview

Note:

When making an API call, you may pass DetectSentimentRequest data as a hash:

{
  text: "String", # required
  language_code: "en", # required, accepts en, es
}

Instance Attribute Summary collapse

Instance Attribute Details

#language_codeString

The RFC 5646 language code for the input text. If you don't specify a language code, Amazon Comprehend detects the dominant language. If you specify the code for a language that Amazon Comprehend does not support, it returns and UnsupportedLanguageException. For more information about RFC 5646, see Tags for Identifying Languages on the IETF Tools web site.

Returns:

  • (String)


505
506
507
508
509
# File 'gems/aws-sdk-comprehend/lib/aws-sdk-comprehend/types.rb', line 505

class DetectSentimentRequest < Struct.new(
  :text,
  :language_code)
  include Aws::Structure
end

#textString

A UTF-8 text string. Each string must contain fewer that 5,000 bytes of UTF-8 encoded characters.

Returns:

  • (String)


505
506
507
508
509
# File 'gems/aws-sdk-comprehend/lib/aws-sdk-comprehend/types.rb', line 505

class DetectSentimentRequest < Struct.new(
  :text,
  :language_code)
  include Aws::Structure
end