Class: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1SchemaPredictPredictionTextSentimentPredictionResult

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

Overview

Prediction output format for Text Sentiment

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudAiplatformV1SchemaPredictPredictionTextSentimentPredictionResult

Returns a new instance of GoogleCloudAiplatformV1SchemaPredictPredictionTextSentimentPredictionResult.



25038
25039
25040
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 25038

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

Instance Attribute Details

#sentimentFixnum

The integer sentiment labels between 0 (inclusive) and sentimentMax label ( inclusive), while 0 maps to the least positive sentiment and sentimentMax maps to the most positive one. The higher the score is, the more positive the sentiment in the text snippet is. Note: sentimentMax is an integer value between 1 (inclusive) and 10 (inclusive). Corresponds to the JSON property sentiment

Returns:

  • (Fixnum)


25036
25037
25038
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 25036

def sentiment
  @sentiment
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



25043
25044
25045
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 25043

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