Interface ToxicLabels.Builder

    • Method Detail

      • labels

        ToxicLabels.Builder labels​(Collection<ToxicContent> labels)

        Array of toxic content types identified in the string.

        Parameters:
        labels - Array of toxic content types identified in the string.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • labels

        ToxicLabels.Builder labels​(ToxicContent... labels)

        Array of toxic content types identified in the string.

        Parameters:
        labels - Array of toxic content types identified in the string.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • toxicity

        ToxicLabels.Builder toxicity​(Float toxicity)

        Overall toxicity score for the string. Value range is zero to one, where one is the highest confidence.

        Parameters:
        toxicity - Overall toxicity score for the string. Value range is zero to one, where one is the highest confidence.
        Returns:
        Returns a reference to this object so that method calls can be chained together.