Class: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1RougeSpec

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

Spec for rouge score metric - calculates the recall of n-grams in prediction as compared to reference - returns a score ranging between 0 and 1.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudAiplatformV1RougeSpec

Returns a new instance of GoogleCloudAiplatformV1RougeSpec.



25632
25633
25634
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 25632

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

Instance Attribute Details

#rouge_typeString

Optional. Supported rouge types are rougen[1-9], rougeL, and rougeLsum. Corresponds to the JSON property rougeType

Returns:

  • (String)


25618
25619
25620
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 25618

def rouge_type
  @rouge_type
end

#split_summariesBoolean Also known as: split_summaries?

Optional. Whether to split summaries while using rougeLsum. Corresponds to the JSON property splitSummaries

Returns:

  • (Boolean)


25623
25624
25625
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 25623

def split_summaries
  @split_summaries
end

#use_stemmerBoolean Also known as: use_stemmer?

Optional. Whether to use stemmer to compute rouge score. Corresponds to the JSON property useStemmer

Returns:

  • (Boolean)


25629
25630
25631
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 25629

def use_stemmer
  @use_stemmer
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



25637
25638
25639
25640
25641
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 25637

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