Class SuggestCommentScoreRequest
The comment score suggestion request message.
Inheritance
Implements
Inherited Members
Namespace: Google.Apis.CommentAnalyzer.v1alpha1.Data
Assembly: Google.Apis.CommentAnalyzer.v1alpha1.dll
Syntax
public class SuggestCommentScoreRequest : IDirectResponseSchema
Properties
AttributeScores
Attribute scores for the comment. The map keys are attribute names, same as the requested_attribute
field in AnalyzeCommentRequest (for example "ATTACK_ON_AUTHOR", "INFLAMMATORY", etc.). This field has the
same type as the attribute_scores field in AnalyzeCommentResponse.
To specify an overall attribute score for the entire comment as a whole, use the summary_score field of
the mapped AttributeScores object. To specify scores on specific subparts of the comment, use the
span_scores field. All SpanScore objects must have begin and end fields set.
All Score objects must be explicitly set (for binary classification, use the score values 0 and 1). If Score
objects don't include a ScoreType, PROBABILITY is assumed.
attribute_scores must not be empty. The mapped AttributeScores objects also must not be empty. An
INVALID_ARGUMENT error is returned for all malformed requests.
Declaration
[JsonProperty("attributeScores")]
public virtual IDictionary<string, AttributeScores> AttributeScores { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.IDictionary<System.String, AttributeScores> |
ClientToken
Opaque token that is echoed from the request to the response.
Declaration
[JsonProperty("clientToken")]
public virtual string ClientToken { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
Comment
The comment being scored.
Declaration
[JsonProperty("comment")]
public virtual TextEntry Comment { get; set; }
Property Value
| Type | Description |
|---|---|
| TextEntry |
CommunityId
Optional identifier associating this comment score suggestion with a particular sub-community. Different communities may have different norms and rules. Specifying this value enables training community- specific models.
Declaration
[JsonProperty("communityId")]
public virtual string CommunityId { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
Context
The context of the comment.
Declaration
[JsonProperty("context")]
public virtual Context Context { get; set; }
Property Value
| Type | Description |
|---|---|
| Context |
ETag
The ETag of the item.
Declaration
public virtual string ETag { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
Languages
The language(s) of the comment and context. If none are specified, we attempt to automatically detect the language. Both ISO and BCP-47 language codes are accepted.
Declaration
[JsonProperty("languages")]
public virtual IList<string> Languages { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.IList<System.String> |
SessionId
Session ID. Used to join related RPCs into a single session. For example, an interactive tool that calls both the AnalyzeComment and SuggestCommentScore RPCs should set all invocations of both RPCs to the same Session ID, typically a random 64-bit integer.
Declaration
[JsonProperty("sessionId")]
public virtual string SessionId { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |