# Cloud Natural Language V1 Client - Class ClassificationCategory (1.2.1)

1.2.1 (latest) 1.2.0 1.1.4 1.0.1 0.34.3 0.33.0 0.32.7 0.31.3 0.30.2 0.29.0 0.28.5 Reference documentation and code samples for the Cloud Natural Language V1 Client class ClassificationCategory.

Represents a category returned from the text classifier.

Generated from protobuf message `google.cloud.language.v1.ClassificationCategory`

## Namespace

Google \\ Cloud \\ Language \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `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** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setName

The name of the category representing the document.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getConfidence

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `float` |   |

### setConfidence

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `float` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |