Class: Google::Apis::LanguageV1::AnnotateTextRequestFeatures
- Inherits:
-
Object
- Object
- Google::Apis::LanguageV1::AnnotateTextRequestFeatures
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/language_v1/classes.rb,
lib/google/apis/language_v1/representations.rb,
lib/google/apis/language_v1/representations.rb
Overview
All available features for sentiment, syntax, and semantic analysis. Setting each one to true will enable that specific analysis for the input.
Instance Attribute Summary collapse
-
#classification_model_options ⇒ Google::Apis::LanguageV1::ClassificationModelOptions
Model options available for classification requests.
-
#classify_text ⇒ Boolean
(also: #classify_text?)
Classify the full document into categories.
-
#extract_document_sentiment ⇒ Boolean
(also: #extract_document_sentiment?)
Extract document-level sentiment.
-
#extract_entities ⇒ Boolean
(also: #extract_entities?)
Extract entities.
-
#extract_entity_sentiment ⇒ Boolean
(also: #extract_entity_sentiment?)
Extract entities and their associated sentiment.
-
#extract_syntax ⇒ Boolean
(also: #extract_syntax?)
Extract syntax information.
-
#moderate_text ⇒ Boolean
(also: #moderate_text?)
Moderate the document for harmful and sensitive categories.
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.
324 325 326 |
# File 'lib/google/apis/language_v1/classes.rb', line 324 def initialize(**args) update!(**args) end |
Instance Attribute Details
#classification_model_options ⇒ Google::Apis::LanguageV1::ClassificationModelOptions
Model options available for classification requests.
Corresponds to the JSON property classificationModelOptions
286 287 288 |
# File 'lib/google/apis/language_v1/classes.rb', line 286 def @classification_model_options end |
#classify_text ⇒ Boolean Also known as: classify_text?
Classify the full document into categories.
Corresponds to the JSON property classifyText
291 292 293 |
# File 'lib/google/apis/language_v1/classes.rb', line 291 def classify_text @classify_text end |
#extract_document_sentiment ⇒ Boolean Also known as: extract_document_sentiment?
Extract document-level sentiment.
Corresponds to the JSON property extractDocumentSentiment
297 298 299 |
# File 'lib/google/apis/language_v1/classes.rb', line 297 def extract_document_sentiment @extract_document_sentiment end |
#extract_entities ⇒ Boolean Also known as: extract_entities?
Extract entities.
Corresponds to the JSON property extractEntities
303 304 305 |
# File 'lib/google/apis/language_v1/classes.rb', line 303 def extract_entities @extract_entities end |
#extract_entity_sentiment ⇒ Boolean Also known as: extract_entity_sentiment?
Extract entities and their associated sentiment.
Corresponds to the JSON property extractEntitySentiment
309 310 311 |
# File 'lib/google/apis/language_v1/classes.rb', line 309 def extract_entity_sentiment @extract_entity_sentiment end |
#extract_syntax ⇒ Boolean Also known as: extract_syntax?
Extract syntax information.
Corresponds to the JSON property extractSyntax
315 316 317 |
# File 'lib/google/apis/language_v1/classes.rb', line 315 def extract_syntax @extract_syntax end |
#moderate_text ⇒ Boolean Also known as: moderate_text?
Moderate the document for harmful and sensitive categories.
Corresponds to the JSON property moderateText
321 322 323 |
# File 'lib/google/apis/language_v1/classes.rb', line 321 def moderate_text @moderate_text end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
329 330 331 332 333 334 335 336 337 |
# File 'lib/google/apis/language_v1/classes.rb', line 329 def update!(**args) @classification_model_options = args[:classification_model_options] if args.key?(:classification_model_options) @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) @extract_entity_sentiment = args[:extract_entity_sentiment] if args.key?(:extract_entity_sentiment) @extract_syntax = args[:extract_syntax] if args.key?(:extract_syntax) @moderate_text = args[:moderate_text] if args.key?(:moderate_text) end |