Cloud Natural Language V2 API - Class Google::Cloud::Language::V2::ClassificationCategory (v0.5.0)

Reference documentation and code samples for the Cloud Natural Language V2 API class Google::Cloud::Language::V2::ClassificationCategory.

Represents a category returned from the text classifier.

Inherits

  • Object

Extended By

  • Google::Protobuf::MessageExts::ClassMethods

Includes

  • Google::Protobuf::MessageExts

Methods

#confidence

def confidence() -> ::Float
Returns
  • (::Float) — The classifier's confidence of the category. Number represents how certain the classifier is that this category represents the given text.

#confidence=

def confidence=(value) -> ::Float
Parameter
  • value (::Float) — The classifier's confidence of the category. Number represents how certain the classifier is that this category represents the given text.
Returns
  • (::Float) — The classifier's confidence of the category. Number represents how certain the classifier is that this category represents the given text.

#name

def name() -> ::String
Returns
  • (::String) — The name of the category representing the document.

#name=

def name=(value) -> ::String
Parameter
  • value (::String) — The name of the category representing the document.
Returns
  • (::String) — The name of the category representing the document.

#severity

def severity() -> ::Float
Returns
  • (::Float) — Optional. The classifier's severity of the category. This is only present when the ModerateTextRequest.ModelVersion is set to MODEL_VERSION_2, and the corresponding category has a severity score.

#severity=

def severity=(value) -> ::Float
Parameter
  • value (::Float) — Optional. The classifier's severity of the category. This is only present when the ModerateTextRequest.ModelVersion is set to MODEL_VERSION_2, and the corresponding category has a severity score.
Returns
  • (::Float) — Optional. The classifier's severity of the category. This is only present when the ModerateTextRequest.ModelVersion is set to MODEL_VERSION_2, and the corresponding category has a severity score.