class AnalyzeSentimentResponse extends Message

The sentiment analysis response message.

Protobuf type Google\Cloud\Language\V1beta2\AnalyzeSentimentResponse

Methods

__construct()

No description

getDocumentSentiment()

The overall sentiment of the input document.

setDocumentSentiment(Sentiment $var)

The overall sentiment of the input document.

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.

RepeatedField
getSentences()

The sentiment for all the sentences in the document.

setSentences(array|RepeatedField $var)

The sentiment for all the sentences in the document.

Details

at line 39
__construct()

at line 50
Sentiment getDocumentSentiment()

The overall sentiment of the input document.

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

Return Value

Sentiment

at line 61
setDocumentSentiment(Sentiment $var)

The overall sentiment of the input document.

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

Parameters

Sentiment $var

at line 75
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 = 2;

Return Value

string

at line 88
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 = 2;

Parameters

string $var

at line 100
RepeatedField getSentences()

The sentiment for all the sentences in the document.

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

Return Value

RepeatedField

at line 111
setSentences(array|RepeatedField $var)

The sentiment for all the sentences in the document.

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

Parameters

array|RepeatedField $var