Cloud Translation V3 Client - Class Example (1.18.0)

Reference documentation and code samples for the Cloud Translation V3 Client class Example.

A sentence pair.

Generated from protobuf message google.cloud.translation.v3.Example

Namespace

Google \ Cloud \ Translate \ V3

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ name string

Output only. The resource name of the example, in form of `projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}/examples/{example_id}'

↳ source_text string

Sentence in source language.

↳ target_text string

Sentence in target language.

↳ usage string

Output only. Usage of the sentence pair. Options are TRAIN|VALIDATION|TEST.

getName

Output only. The resource name of the example, in form of `projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}/examples/{example_id}'

Returns
Type Description
string

setName

Output only. The resource name of the example, in form of `projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}/examples/{example_id}'

Parameter
Name Description
var string
Returns
Type Description
$this

getSourceText

Sentence in source language.

Returns
Type Description
string

setSourceText

Sentence in source language.

Parameter
Name Description
var string
Returns
Type Description
$this

getTargetText

Sentence in target language.

Returns
Type Description
string

setTargetText

Sentence in target language.

Parameter
Name Description
var string
Returns
Type Description
$this

getUsage

Output only. Usage of the sentence pair. Options are TRAIN|VALIDATION|TEST.

Returns
Type Description
string

setUsage

Output only. Usage of the sentence pair. Options are TRAIN|VALIDATION|TEST.

Parameter
Name Description
var string
Returns
Type Description
$this