Class: Google::Apis::LanguageV2::AnnotateTextRequestFeatures
- Inherits:
-
Object
- Object
- Google::Apis::LanguageV2::AnnotateTextRequestFeatures
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/language_v2/classes.rb,
lib/google/apis/language_v2/representations.rb,
lib/google/apis/language_v2/representations.rb
Overview
All available features. Setting each one to true will enable that specific analysis for the input.
Instance Attribute Summary collapse
-
#classify_text ⇒ Boolean
(also: #classify_text?)
Optional.
-
#extract_document_sentiment ⇒ Boolean
(also: #extract_document_sentiment?)
Optional.
-
#extract_entities ⇒ Boolean
(also: #extract_entities?)
Optional.
-
#moderate_text ⇒ Boolean
(also: #moderate_text?)
Optional.
Instance Method Summary collapse
-
#initialize(**args) ⇒ AnnotateTextRequestFeatures
constructor
A new instance of AnnotateTextRequestFeatures.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ AnnotateTextRequestFeatures
Returns a new instance of AnnotateTextRequestFeatures.
213 214 215 |
# File 'lib/google/apis/language_v2/classes.rb', line 213 def initialize(**args) update!(**args) end |
Instance Attribute Details
#classify_text ⇒ Boolean Also known as: classify_text?
Optional. Classify the full document into categories.
Corresponds to the JSON property classifyText
192 193 194 |
# File 'lib/google/apis/language_v2/classes.rb', line 192 def classify_text @classify_text end |
#extract_document_sentiment ⇒ Boolean Also known as: extract_document_sentiment?
Optional. Extract document-level sentiment.
Corresponds to the JSON property extractDocumentSentiment
198 199 200 |
# File 'lib/google/apis/language_v2/classes.rb', line 198 def extract_document_sentiment @extract_document_sentiment end |
#extract_entities ⇒ Boolean Also known as: extract_entities?
Optional. Extract entities.
Corresponds to the JSON property extractEntities
204 205 206 |
# File 'lib/google/apis/language_v2/classes.rb', line 204 def extract_entities @extract_entities end |
#moderate_text ⇒ Boolean Also known as: moderate_text?
Optional. Moderate the document for harmful and sensitive categories.
Corresponds to the JSON property moderateText
210 211 212 |
# File 'lib/google/apis/language_v2/classes.rb', line 210 def moderate_text @moderate_text end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
218 219 220 221 222 223 |
# File 'lib/google/apis/language_v2/classes.rb', line 218 def update!(**args) @classify_text = args[:classify_text] if args.key?(:classify_text) @extract_document_sentiment = args[:extract_document_sentiment] if args.key?(:extract_document_sentiment) @extract_entities = args[:extract_entities] if args.key?(:extract_entities) @moderate_text = args[:moderate_text] if args.key?(:moderate_text) end |