Class: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1RougeSpec
- Inherits:
-
Object
- Object
- Google::Apis::AiplatformV1::GoogleCloudAiplatformV1RougeSpec
- 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
-
#rouge_type ⇒ String
Optional.
-
#split_summaries ⇒ Boolean
(also: #split_summaries?)
Optional.
-
#use_stemmer ⇒ Boolean
(also: #use_stemmer?)
Optional.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudAiplatformV1RougeSpec
constructor
A new instance of GoogleCloudAiplatformV1RougeSpec.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudAiplatformV1RougeSpec
Returns a new instance of GoogleCloudAiplatformV1RougeSpec.
21993 21994 21995 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 21993 def initialize(**args) update!(**args) end |
Instance Attribute Details
#rouge_type ⇒ String
Optional. Supported rouge types are rougen[1-9], rougeL, and rougeLsum.
Corresponds to the JSON property rougeType
21979 21980 21981 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 21979 def rouge_type @rouge_type end |
#split_summaries ⇒ Boolean Also known as: split_summaries?
Optional. Whether to split summaries while using rougeLsum.
Corresponds to the JSON property splitSummaries
21984 21985 21986 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 21984 def split_summaries @split_summaries end |
#use_stemmer ⇒ Boolean Also known as: use_stemmer?
Optional. Whether to use stemmer to compute rouge score.
Corresponds to the JSON property useStemmer
21990 21991 21992 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 21990 def use_stemmer @use_stemmer end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
21998 21999 22000 22001 22002 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 21998 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 |