class Sentence extends Message

Represents a sentence in the input document.

Protobuf type Google\Cloud\Language\V1beta2\Sentence

Methods

__construct()

No description

getText()

The sentence text.

setText(TextSpan $var)

The sentence text.

getSentiment()

For calls to [AnalyzeSentiment][] or if [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_document_sentiment] is set to true, this field will contain the sentiment for the sentence.

setSentiment(Sentiment $var)

For calls to [AnalyzeSentiment][] or if [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_document_sentiment] is set to true, this field will contain the sentiment for the sentence.

Details

at line 33
__construct()

at line 44
TextSpan getText()

The sentence text.

Generated from protobuf field .google.cloud.language.v1beta2.TextSpan text = 1;

Return Value

TextSpan

at line 55
setText(TextSpan $var)

The sentence text.

Generated from protobuf field .google.cloud.language.v1beta2.TextSpan text = 1;

Parameters

TextSpan $var

at line 69
Sentiment getSentiment()

For calls to [AnalyzeSentiment][] or if [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_document_sentiment] is set to true, this field will contain the sentiment for the sentence.

Generated from protobuf field .google.cloud.language.v1beta2.Sentiment sentiment = 2;

Return Value

Sentiment

at line 82
setSentiment(Sentiment $var)

For calls to [AnalyzeSentiment][] or if [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_document_sentiment] is set to true, this field will contain the sentiment for the sentence.

Generated from protobuf field .google.cloud.language.v1beta2.Sentiment sentiment = 2;

Parameters

Sentiment $var