Class: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1SchemaTextSentimentAnnotation

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/aiplatform_v1/classes.rb,
lib/google/apis/aiplatform_v1/representations.rb,
lib/google/apis/aiplatform_v1/representations.rb
more...

Overview

Annotation details specific to text sentiment.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudAiplatformV1SchemaTextSentimentAnnotation

Returns a new instance of GoogleCloudAiplatformV1SchemaTextSentimentAnnotation.

[View source]

24539
24540
24541
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 24539

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

Instance Attribute Details

#annotation_spec_idString

The resource Id of the AnnotationSpec that this Annotation pertains to. Corresponds to the JSON property annotationSpecId

Returns:

  • (String)

24522
24523
24524
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 24522

def annotation_spec_id
  @annotation_spec_id
end

#display_nameString

The display name of the AnnotationSpec that this Annotation pertains to. Corresponds to the JSON property displayName

Returns:

  • (String)

24527
24528
24529
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 24527

def display_name
  @display_name
end

#sentimentFixnum

The sentiment score for text. Corresponds to the JSON property sentiment

Returns:

  • (Fixnum)

24532
24533
24534
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 24532

def sentiment
  @sentiment
end

#sentiment_maxFixnum

The sentiment max score for text. Corresponds to the JSON property sentimentMax

Returns:

  • (Fixnum)

24537
24538
24539
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 24537

def sentiment_max
  @sentiment_max
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object

[View source]

24544
24545
24546
24547
24548
24549
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 24544

def update!(**args)
  @annotation_spec_id = args[:annotation_spec_id] if args.key?(:annotation_spec_id)
  @display_name = args[:display_name] if args.key?(:display_name)
  @sentiment = args[:sentiment] if args.key?(:sentiment)
  @sentiment_max = args[:sentiment_max] if args.key?(:sentiment_max)
end