Class: Google::Apis::LanguageV1beta1::Features

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/language_v1beta1/classes.rb,
generated/google/apis/language_v1beta1/representations.rb,
generated/google/apis/language_v1beta1/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

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Features

Returns a new instance of Features



607
608
609
# File 'generated/google/apis/language_v1beta1/classes.rb', line 607

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#extract_document_sentimentBoolean Also known as: extract_document_sentiment?

Extract document-level sentiment. Corresponds to the JSON property extractDocumentSentiment

Returns:

  • (Boolean)


598
599
600
# File 'generated/google/apis/language_v1beta1/classes.rb', line 598

def extract_document_sentiment
  @extract_document_sentiment
end

#extract_entitiesBoolean Also known as: extract_entities?

Extract entities. Corresponds to the JSON property extractEntities

Returns:

  • (Boolean)


604
605
606
# File 'generated/google/apis/language_v1beta1/classes.rb', line 604

def extract_entities
  @extract_entities
end

#extract_syntaxBoolean Also known as: extract_syntax?

Extract syntax information. Corresponds to the JSON property extractSyntax

Returns:

  • (Boolean)


592
593
594
# File 'generated/google/apis/language_v1beta1/classes.rb', line 592

def extract_syntax
  @extract_syntax
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



612
613
614
615
616
# File 'generated/google/apis/language_v1beta1/classes.rb', line 612

def update!(**args)
  @extract_syntax = args[:extract_syntax] if args.key?(:extract_syntax)
  @extract_document_sentiment = args[:extract_document_sentiment] if args.key?(:extract_document_sentiment)
  @extract_entities = args[:extract_entities] if args.key?(:extract_entities)
end