Cloud Natural Language V1beta2 Client - Class ClassificationCategory (0.30.2)

Reference documentation and code samples for the Cloud Natural Language V1beta2 Client class ClassificationCategory.

Represents a category returned from the text classifier.

Generated from protobuf message google.cloud.language.v1beta2.ClassificationCategory

Namespace

Google \ Cloud \ Language \ V1beta2

Methods

__construct

Constructor.

Parameters
NameDescription
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.

getName

The name of the category representing the document.

Returns
TypeDescription
string

setName

The name of the category representing the document.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getConfidence

The classifier's confidence of the category. Number represents how certain the classifier is that this category represents the given text.

Returns
TypeDescription
float

setConfidence

The classifier's confidence of the category. Number represents how certain the classifier is that this category represents the given text.

Parameter
NameDescription
var float
Returns
TypeDescription
$this