Class: Google::Apis::LanguageV1beta2::Features
- Inherits:
-
Object
- Object
- Google::Apis::LanguageV1beta2::Features
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/language_v1beta2/classes.rb,
generated/google/apis/language_v1beta2/representations.rb,
generated/google/apis/language_v1beta2/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. Next ID: 10
Instance Attribute Summary collapse
-
#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.
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.
626 627 628 |
# File 'generated/google/apis/language_v1beta2/classes.rb', line 626 def initialize(**args) update!(**args) end |
Instance Attribute Details
#classify_text ⇒ Boolean Also known as: classify_text?
Classify the full document into categories. If this is true, the API will use
the default model which classifies into a predefined taxonomy.
Corresponds to the JSON property classifyText
599 600 601 |
# File 'generated/google/apis/language_v1beta2/classes.rb', line 599 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
605 606 607 |
# File 'generated/google/apis/language_v1beta2/classes.rb', line 605 def extract_document_sentiment @extract_document_sentiment end |
#extract_entities ⇒ Boolean Also known as: extract_entities?
Extract entities.
Corresponds to the JSON property extractEntities
611 612 613 |
# File 'generated/google/apis/language_v1beta2/classes.rb', line 611 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
617 618 619 |
# File 'generated/google/apis/language_v1beta2/classes.rb', line 617 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
623 624 625 |
# File 'generated/google/apis/language_v1beta2/classes.rb', line 623 def extract_syntax @extract_syntax end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
631 632 633 634 635 636 637 |
# File 'generated/google/apis/language_v1beta2/classes.rb', line 631 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) @extract_entity_sentiment = args[:extract_entity_sentiment] if args.key?(:extract_entity_sentiment) @extract_syntax = args[:extract_syntax] if args.key?(:extract_syntax) end |