# Cloud Natural Language V1 Client - Class Features (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 Features.

All available features for sentiment, syntax, and semantic analysis.

Setting each one to true will enable that specific analysis for the input.

Generated from protobuf message `google.cloud.language.v1.AnnotateTextRequest.Features`

## Namespace

Google \\ Cloud \\ Language \\ V1 \\ AnnotateTextRequest

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ extract_syntax` | `bool` Extract syntax information. |
| `↳ extract_entities` | `bool` Extract entities. |
| `↳ extract_document_sentiment` | `bool` Extract document-level sentiment. |
| `↳ extract_entity_sentiment` | `bool` Extract entities and their associated sentiment. |
| `↳ classify_text` | `bool` Classify the full document into categories. |
| `↳ moderate_text` | `bool` Moderate the document for harmful and sensitive categories. |
| `↳ classification_model_options` | `https://docs.cloud.google.com/php/docs/reference/cloud-language/latest/V1.ClassificationModelOptions` The model options to use for classification. Defaults to v1 options if not specified. Only used if `classify_text` is set to true. |

### getExtractSyntax

Extract syntax information.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setExtractSyntax

Extract syntax information.

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

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

### getExtractEntities

Extract entities.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setExtractEntities

Extract entities.

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

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

### getExtractDocumentSentiment

Extract document-level sentiment.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setExtractDocumentSentiment

Extract document-level sentiment.

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

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

### getExtractEntitySentiment

Extract entities and their associated sentiment.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setExtractEntitySentiment

Extract entities and their associated sentiment.

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

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

### getClassifyText

Classify the full document into categories.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setClassifyText

Classify the full document into categories.

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

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

### getModerateText

Moderate the document for harmful and sensitive categories.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setModerateText

Moderate the document for harmful and sensitive categories.

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

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

### getClassificationModelOptions

The model options to use for classification. Defaults to v1 options
if not specified. Only used if `classify_text` is set to true.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-language/latest/V1.ClassificationModelOptions|null` |   |

### hasClassificationModelOptions

### clearClassificationModelOptions

### setClassificationModelOptions

The model options to use for classification. Defaults to v1 options
if not specified. Only used if `classify_text` is set to true.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-language/latest/V1.ClassificationModelOptions` |

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