Class: Google::Apis::CommentanalyzerV1alpha1::AttributeScores

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
generated/google/apis/commentanalyzer_v1alpha1/classes.rb,
generated/google/apis/commentanalyzer_v1alpha1/representations.rb,
generated/google/apis/commentanalyzer_v1alpha1/representations.rb

Overview

This holds score values for a single attribute. It contains both per-span scores as well as an overall summary score..

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Google::Apis::Core::JsonObjectSupport

#to_json

Methods included from Google::Apis::Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ AttributeScores

Returns a new instance of AttributeScores



241
242
243
# File 'generated/google/apis/commentanalyzer_v1alpha1/classes.rb', line 241

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

Instance Attribute Details

#span_scoresArray<Google::Apis::CommentanalyzerV1alpha1::SpanScore>

Per-span scores. Corresponds to the JSON property spanScores



234
235
236
# File 'generated/google/apis/commentanalyzer_v1alpha1/classes.rb', line 234

def span_scores
  @span_scores
end

#summary_scoreGoogle::Apis::CommentanalyzerV1alpha1::Score

Analysis scores are described by a value and a ScoreType. Corresponds to the JSON property summaryScore



239
240
241
# File 'generated/google/apis/commentanalyzer_v1alpha1/classes.rb', line 239

def summary_score
  @summary_score
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



246
247
248
249
# File 'generated/google/apis/commentanalyzer_v1alpha1/classes.rb', line 246

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