Class: Google::Apis::CommentanalyzerV1alpha1::AnalyzeCommentResponse
- Inherits:
-
Object
- Object
- Google::Apis::CommentanalyzerV1alpha1::AnalyzeCommentResponse
- Defined in:
- generated/google/apis/commentanalyzer_v1alpha1/classes.rb,
generated/google/apis/commentanalyzer_v1alpha1/representations.rb,
generated/google/apis/commentanalyzer_v1alpha1/representations.rb
Overview
The comment analysis response message.
Instance Attribute Summary collapse
-
#attribute_scores ⇒ Hash<String,Google::Apis::CommentanalyzerV1alpha1::AttributeScores>
Scores for the requested attributes.
-
#client_token ⇒ String
Same token from the original AnalyzeCommentRequest.
-
#detected_languages ⇒ Array<String>
Contains the languages detected from the text content, sorted in order of likelihood.
-
#languages ⇒ Array<String>
The language(s) used by CommentAnalyzer service to choose which Model to use when analyzing the comment.
Instance Method Summary collapse
-
#initialize(**args) ⇒ AnalyzeCommentResponse
constructor
A new instance of AnalyzeCommentResponse.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Google::Apis::Core::JsonObjectSupport
Methods included from Google::Apis::Core::Hashable
Constructor Details
#initialize(**args) ⇒ AnalyzeCommentResponse
Returns a new instance of AnalyzeCommentResponse.
157 158 159 |
# File 'generated/google/apis/commentanalyzer_v1alpha1/classes.rb', line 157 def initialize(**args) update!(**args) end |
Instance Attribute Details
#attribute_scores ⇒ Hash<String,Google::Apis::CommentanalyzerV1alpha1::AttributeScores>
Scores for the requested attributes. The map keys are attribute names (same
as the requested_attribute field in AnalyzeCommentRequest, for example
"ATTACK_ON_AUTHOR", "INFLAMMATORY", etc).
Corresponds to the JSON property attributeScores
133 134 135 |
# File 'generated/google/apis/commentanalyzer_v1alpha1/classes.rb', line 133 def attribute_scores @attribute_scores end |
#client_token ⇒ String
Same token from the original AnalyzeCommentRequest.
Corresponds to the JSON property clientToken
138 139 140 |
# File 'generated/google/apis/commentanalyzer_v1alpha1/classes.rb', line 138 def client_token @client_token end |
#detected_languages ⇒ Array<String>
Contains the languages detected from the text content, sorted in order of
likelihood.
Corresponds to the JSON property detectedLanguages
144 145 146 |
# File 'generated/google/apis/commentanalyzer_v1alpha1/classes.rb', line 144 def detected_languages @detected_languages end |
#languages ⇒ Array<String>
The language(s) used by CommentAnalyzer service to choose which Model to
use when analyzing the comment. Might better be called
"effective_languages". The logic used to make the choice is as follows:
if !Request.languages.empty()
effective_languages = Request.languages
else
effective_languages = detected_languages[0]
Corresponds to the JSON property languages
155 156 157 |
# File 'generated/google/apis/commentanalyzer_v1alpha1/classes.rb', line 155 def languages @languages end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
162 163 164 165 166 167 |
# File 'generated/google/apis/commentanalyzer_v1alpha1/classes.rb', line 162 def update!(**args) @attribute_scores = args[:attribute_scores] if args.key?(:attribute_scores) @client_token = args[:client_token] if args.key?(:client_token) @detected_languages = args[:detected_languages] if args.key?(:detected_languages) @languages = args[:languages] if args.key?(:languages) end |