Class: Google::Apis::CommentanalyzerV1alpha1::AttributeParameters

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

Configurable parameters for attribute scoring.

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) ⇒ AttributeParameters

Returns a new instance of AttributeParameters.



213
214
215
# File 'generated/google/apis/commentanalyzer_v1alpha1/classes.rb', line 213

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

Instance Attribute Details

#score_thresholdFloat

Don't return scores for this attribute that are below this threshold. If unset, a default threshold will be applied. A FloatValue wrapper is used to distinguish between 0 vs. default/unset. Corresponds to the JSON property scoreThreshold

Returns:

  • (Float)


206
207
208
# File 'generated/google/apis/commentanalyzer_v1alpha1/classes.rb', line 206

def score_threshold
  @score_threshold
end

#score_typeString

What type of scores to return. If unset, defaults to probability scores. Corresponds to the JSON property scoreType

Returns:

  • (String)


211
212
213
# File 'generated/google/apis/commentanalyzer_v1alpha1/classes.rb', line 211

def score_type
  @score_type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



218
219
220
221
# File 'generated/google/apis/commentanalyzer_v1alpha1/classes.rb', line 218

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