google_api_comment_analyzer v0.4.0 GoogleApi.CommentAnalyzer.V1alpha1.Model.SuggestCommentScoreRequest View Source

The comment score suggestion request message.

Attributes

  • attributeScores (type: %{optional(String.t) => GoogleApi.CommentAnalyzer.V1alpha1.Model.AttributeScores.t}, default: nil) - 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.

  • clientToken (type: String.t, default: nil) - Opaque token that is echoed from the request to the response.

  • comment (type: GoogleApi.CommentAnalyzer.V1alpha1.Model.TextEntry.t, default: nil) - The comment being scored.

  • communityId (type: String.t, default: nil) - 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.

  • context (type: GoogleApi.CommentAnalyzer.V1alpha1.Model.Context.t, default: nil) - The context of the comment.

  • languages (type: list(String.t), default: nil) - 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.

  • sessionId (type: String.t, default: nil) - 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.

Link to this section Summary

Functions

Unwrap a decoded JSON object into its complex fields.

Link to this section Types

Link to this type

t()

View Source
t() :: %GoogleApi.CommentAnalyzer.V1alpha1.Model.SuggestCommentScoreRequest{
  attributeScores: %{
    optional(String.t()) =>
      GoogleApi.CommentAnalyzer.V1alpha1.Model.AttributeScores.t()
  },
  clientToken: String.t(),
  comment: GoogleApi.CommentAnalyzer.V1alpha1.Model.TextEntry.t(),
  communityId: String.t(),
  context: GoogleApi.CommentAnalyzer.V1alpha1.Model.Context.t(),
  languages: [String.t()],
  sessionId: String.t()
}

Link to this section Functions

Link to this function

decode(value, options)

View Source
decode(struct(), keyword()) :: struct()

Unwrap a decoded JSON object into its complex fields.