Class: Google::Apis::LanguageV1::Features

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

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



614
615
616
# File 'generated/google/apis/language_v1/classes.rb', line 614

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

Instance Attribute Details

#classify_textBoolean Also known as: classify_text?

Classify the full document into categories. Corresponds to the JSON property classifyText

Returns:

  • (Boolean)


587
588
589
# File 'generated/google/apis/language_v1/classes.rb', line 587

def classify_text
  @classify_text
end

#extract_document_sentimentBoolean Also known as: extract_document_sentiment?

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

Returns:

  • (Boolean)


593
594
595
# File 'generated/google/apis/language_v1/classes.rb', line 593

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)


599
600
601
# File 'generated/google/apis/language_v1/classes.rb', line 599

def extract_entities
  @extract_entities
end

#extract_entity_sentimentBoolean Also known as: extract_entity_sentiment?

Extract entities and their associated sentiment. Corresponds to the JSON property extractEntitySentiment

Returns:

  • (Boolean)


605
606
607
# File 'generated/google/apis/language_v1/classes.rb', line 605

def extract_entity_sentiment
  @extract_entity_sentiment
end

#extract_syntaxBoolean Also known as: extract_syntax?

Extract syntax information. Corresponds to the JSON property extractSyntax

Returns:

  • (Boolean)


611
612
613
# File 'generated/google/apis/language_v1/classes.rb', line 611

def extract_syntax
  @extract_syntax
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



619
620
621
622
623
624
625
# File 'generated/google/apis/language_v1/classes.rb', line 619

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