Class: Google::Apis::LanguageV2::Features
- Inherits:
-
Object
- Object
- Google::Apis::LanguageV2::Features
- 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) ⇒ Features
constructor
A new instance of Features.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Features
Returns a new instance of Features.
489 490 491 |
# File 'lib/google/apis/language_v2/classes.rb', line 489 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
468 469 470 |
# File 'lib/google/apis/language_v2/classes.rb', line 468 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
474 475 476 |
# File 'lib/google/apis/language_v2/classes.rb', line 474 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
480 481 482 |
# File 'lib/google/apis/language_v2/classes.rb', line 480 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
486 487 488 |
# File 'lib/google/apis/language_v2/classes.rb', line 486 def moderate_text @moderate_text end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
494 495 496 497 498 499 |
# File 'lib/google/apis/language_v2/classes.rb', line 494 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 |