Class: Google::Apis::LanguageV1beta2::AnnotateTextRequestFeatures

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ AnnotateTextRequestFeatures

Returns a new instance of AnnotateTextRequestFeatures.



328
329
330
# File 'lib/google/apis/language_v1beta2/classes.rb', line 328

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

Instance Attribute Details

#classification_model_optionsGoogle::Apis::LanguageV1beta2::ClassificationModelOptions

Model options available for classification requests. Corresponds to the JSON property classificationModelOptions



288
289
290
# File 'lib/google/apis/language_v1beta2/classes.rb', line 288

def classification_model_options
  @classification_model_options
end

#classify_textBoolean 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

Returns:

  • (Boolean)


295
296
297
# File 'lib/google/apis/language_v1beta2/classes.rb', line 295

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)


301
302
303
# File 'lib/google/apis/language_v1beta2/classes.rb', line 301

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)


307
308
309
# File 'lib/google/apis/language_v1beta2/classes.rb', line 307

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)


313
314
315
# File 'lib/google/apis/language_v1beta2/classes.rb', line 313

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)


319
320
321
# File 'lib/google/apis/language_v1beta2/classes.rb', line 319

def extract_syntax
  @extract_syntax
end

#moderate_textBoolean Also known as: moderate_text?

Moderate the document for harmful and sensitive categories. Corresponds to the JSON property moderateText

Returns:

  • (Boolean)


325
326
327
# File 'lib/google/apis/language_v1beta2/classes.rb', line 325

def moderate_text
  @moderate_text
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



333
334
335
336
337
338
339
340
341
# File 'lib/google/apis/language_v1beta2/classes.rb', line 333

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