Class: Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1QaResult

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

Overview

Additional result info for the question-answering feature.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudContentwarehouseV1QaResult

Returns a new instance of GoogleCloudContentwarehouseV1QaResult.



2960
2961
2962
# File 'lib/google/apis/contentwarehouse_v1/classes.rb', line 2960

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

Instance Attribute Details

#confidence_scoreFloat

The calibrated confidence score for this document, in the range [0., 1.]. This represents the confidence level for whether the returned document and snippet answers the user's query. Corresponds to the JSON property confidenceScore

Returns:

  • (Float)


2953
2954
2955
# File 'lib/google/apis/contentwarehouse_v1/classes.rb', line 2953

def confidence_score
  @confidence_score
end

#highlightsArray<Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1QaResultHighlight>

Highlighted sections in the snippet. Corresponds to the JSON property highlights



2958
2959
2960
# File 'lib/google/apis/contentwarehouse_v1/classes.rb', line 2958

def highlights
  @highlights
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2965
2966
2967
2968
# File 'lib/google/apis/contentwarehouse_v1/classes.rb', line 2965

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