Reference documentation and code samples for the Cloud Natural Language V2 Client class ClassificationCategory.
Represents a category returned from the text classifier.
Generated from protobuf message google.cloud.language.v2.ClassificationCategory
Namespace
Google \ Cloud \ Language \ V2Methods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ name
string
The name of the category representing the document.
↳ confidence
float
The classifier's confidence of the category. Number represents how certain the classifier is that this category represents the given text.
↳ severity
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.
getName
The name of the category representing the document.
string
setName
The name of the category representing the document.
var
string
$this
getConfidence
The classifier's confidence of the category. Number represents how certain the classifier is that this category represents the given text.
float
setConfidence
The classifier's confidence of the category. Number represents how certain the classifier is that this category represents the given text.
var
float
$this
getSeverity
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.
float
setSeverity
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.
var
float
$this