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

Represents part of speech information for a token. Parts of speech
are as defined in
<http://www.lrec-conf.org/proceedings/lrec2012/pdf/274_Paper.pdf>

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

## Namespace

Google \\ Cloud \\ Language \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ tag` | `int` The part of speech tag. |
| `↳ aspect` | `int` The grammatical aspect. |
| `↳ case` | `int` The grammatical case. |
| `↳ form` | `int` The grammatical form. |
| `↳ gender` | `int` The grammatical gender. |
| `↳ mood` | `int` The grammatical mood. |
| `↳ number` | `int` The grammatical number. |
| `↳ person` | `int` The grammatical person. |
| `↳ proper` | `int` The grammatical properness. |
| `↳ reciprocity` | `int` The grammatical reciprocity. |
| `↳ tense` | `int` The grammatical tense. |
| `↳ voice` | `int` The grammatical voice. |

### getTag

The part of speech tag.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [Tag](https://docs.cloud.google.com/php/docs/reference/cloud-language/latest/V1.PartOfSpeech.Tag). |

### setTag

The part of speech tag.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [Tag](https://docs.cloud.google.com/php/docs/reference/cloud-language/latest/V1.PartOfSpeech.Tag). |

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

### getAspect

The grammatical aspect.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [Aspect](https://docs.cloud.google.com/php/docs/reference/cloud-language/latest/V1.PartOfSpeech.Aspect). |

### setAspect

The grammatical aspect.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [Aspect](https://docs.cloud.google.com/php/docs/reference/cloud-language/latest/V1.PartOfSpeech.Aspect). |

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

### getCase

The grammatical case.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [Case](https://docs.cloud.google.com/php/docs/reference/cloud-language/latest/V1.PartOfSpeech.PBCase). |

### setCase

The grammatical case.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [Case](https://docs.cloud.google.com/php/docs/reference/cloud-language/latest/V1.PartOfSpeech.PBCase). |

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

### getForm

The grammatical form.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [Form](https://docs.cloud.google.com/php/docs/reference/cloud-language/latest/V1.PartOfSpeech.Form). |

### setForm

The grammatical form.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [Form](https://docs.cloud.google.com/php/docs/reference/cloud-language/latest/V1.PartOfSpeech.Form). |

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

### getGender

The grammatical gender.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [Gender](https://docs.cloud.google.com/php/docs/reference/cloud-language/latest/V1.PartOfSpeech.Gender). |

### setGender

The grammatical gender.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [Gender](https://docs.cloud.google.com/php/docs/reference/cloud-language/latest/V1.PartOfSpeech.Gender). |

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

### getMood

The grammatical mood.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [Mood](https://docs.cloud.google.com/php/docs/reference/cloud-language/latest/V1.PartOfSpeech.Mood). |

### setMood

The grammatical mood.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [Mood](https://docs.cloud.google.com/php/docs/reference/cloud-language/latest/V1.PartOfSpeech.Mood). |

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

### getNumber

The grammatical number.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [Number](https://docs.cloud.google.com/php/docs/reference/cloud-language/latest/V1.PartOfSpeech.Number). |

### setNumber

The grammatical number.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [Number](https://docs.cloud.google.com/php/docs/reference/cloud-language/latest/V1.PartOfSpeech.Number). |

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

### getPerson

The grammatical person.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [Person](https://docs.cloud.google.com/php/docs/reference/cloud-language/latest/V1.PartOfSpeech.Person). |

### setPerson

The grammatical person.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [Person](https://docs.cloud.google.com/php/docs/reference/cloud-language/latest/V1.PartOfSpeech.Person). |

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

### getProper

The grammatical properness.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [Proper](https://docs.cloud.google.com/php/docs/reference/cloud-language/latest/V1.PartOfSpeech.Proper). |

### setProper

The grammatical properness.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [Proper](https://docs.cloud.google.com/php/docs/reference/cloud-language/latest/V1.PartOfSpeech.Proper). |

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

### getReciprocity

The grammatical reciprocity.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [Reciprocity](https://docs.cloud.google.com/php/docs/reference/cloud-language/latest/V1.PartOfSpeech.Reciprocity). |

### setReciprocity

The grammatical reciprocity.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [Reciprocity](https://docs.cloud.google.com/php/docs/reference/cloud-language/latest/V1.PartOfSpeech.Reciprocity). |

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

### getTense

The grammatical tense.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [Tense](https://docs.cloud.google.com/php/docs/reference/cloud-language/latest/V1.PartOfSpeech.Tense). |

### setTense

The grammatical tense.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [Tense](https://docs.cloud.google.com/php/docs/reference/cloud-language/latest/V1.PartOfSpeech.Tense). |

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

### getVoice

The grammatical voice.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [Voice](https://docs.cloud.google.com/php/docs/reference/cloud-language/latest/V1.PartOfSpeech.Voice). |

### setVoice

The grammatical voice.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [Voice](https://docs.cloud.google.com/php/docs/reference/cloud-language/latest/V1.PartOfSpeech.Voice). |

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