class AnnotateTextResponse extends Message

The text annotations response message.

Protobuf type Google\Cloud\Language\V1beta2\AnnotateTextResponse

Methods

__construct()

No description

RepeatedField
getSentences()

Sentences in the input document. Populated if the user enables [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_syntax].

setSentences(array|RepeatedField $var)

Sentences in the input document. Populated if the user enables [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_syntax].

RepeatedField
getTokens()

Tokens, along with their syntactic information, in the input document.

setTokens(array|RepeatedField $var)

Tokens, along with their syntactic information, in the input document.

RepeatedField
getEntities()

Entities, along with their semantic information, in the input document.

setEntities(array|RepeatedField $var)

Entities, along with their semantic information, in the input document.

getDocumentSentiment()

The overall sentiment for the document. Populated if the user enables [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_document_sentiment].

setDocumentSentiment(Sentiment $var)

The overall sentiment for the document. Populated if the user enables [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_document_sentiment].

string
getLanguage()

The language of the text, which will be the same as the language specified in the request or, if not specified, the automatically-detected language.

setLanguage(string $var)

The language of the text, which will be the same as the language specified in the request or, if not specified, the automatically-detected language.

Details

at line 57
__construct()

at line 69
RepeatedField getSentences()

Sentences in the input document. Populated if the user enables [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_syntax].

Generated from protobuf field repeated .google.cloud.language.v1beta2.Sentence sentences = 1;

Return Value

RepeatedField

at line 81
setSentences(array|RepeatedField $var)

Sentences in the input document. Populated if the user enables [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_syntax].

Generated from protobuf field repeated .google.cloud.language.v1beta2.Sentence sentences = 1;

Parameters

array|RepeatedField $var

at line 95
RepeatedField getTokens()

Tokens, along with their syntactic information, in the input document.

Populated if the user enables [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_syntax].

Generated from protobuf field repeated .google.cloud.language.v1beta2.Token tokens = 2;

Return Value

RepeatedField

at line 108
setTokens(array|RepeatedField $var)

Tokens, along with their syntactic information, in the input document.

Populated if the user enables [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_syntax].

Generated from protobuf field repeated .google.cloud.language.v1beta2.Token tokens = 2;

Parameters

array|RepeatedField $var

at line 122
RepeatedField getEntities()

Entities, along with their semantic information, in the input document.

Populated if the user enables [AnnotateTextRequest.Features.extract_entities][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_entities].

Generated from protobuf field repeated .google.cloud.language.v1beta2.Entity entities = 3;

Return Value

RepeatedField

at line 135
setEntities(array|RepeatedField $var)

Entities, along with their semantic information, in the input document.

Populated if the user enables [AnnotateTextRequest.Features.extract_entities][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_entities].

Generated from protobuf field repeated .google.cloud.language.v1beta2.Entity entities = 3;

Parameters

array|RepeatedField $var

at line 148
Sentiment getDocumentSentiment()

The overall sentiment for the document. Populated if the user enables [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_document_sentiment].

Generated from protobuf field .google.cloud.language.v1beta2.Sentiment document_sentiment = 4;

Return Value

Sentiment

at line 160
setDocumentSentiment(Sentiment $var)

The overall sentiment for the document. Populated if the user enables [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_document_sentiment].

Generated from protobuf field .google.cloud.language.v1beta2.Sentiment document_sentiment = 4;

Parameters

Sentiment $var

at line 174
string getLanguage()

The language of the text, which will be the same as the language specified in the request or, if not specified, the automatically-detected language.

See [Document.language][google.cloud.language.v1beta2.Document.language] field for more details.

Generated from protobuf field string language = 5;

Return Value

string

at line 187
setLanguage(string $var)

The language of the text, which will be the same as the language specified in the request or, if not specified, the automatically-detected language.

See [Document.language][google.cloud.language.v1beta2.Document.language] field for more details.

Generated from protobuf field string language = 5;

Parameters

string $var