Reference documentation and code samples for the Cloud Natural Language V2 Client class Sentence.
Represents a sentence in the input document.
Generated from protobuf message google.cloud.language.v2.Sentence
Namespace
Google \ Cloud \ Language \ V2Methods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ text
↳ sentiment
Google\Cloud\Language\V2\Sentiment
For calls to AnalyzeSentiment or if AnnotateTextRequest.Features.extract_document_sentiment is set to true, this field will contain the sentiment for the sentence.
getText
The sentence text.
hasText
clearText
setText
The sentence text.
$this
getSentiment
For calls to AnalyzeSentiment or if AnnotateTextRequest.Features.extract_document_sentiment is set to true, this field will contain the sentiment for the sentence.
hasSentiment
clearSentiment
setSentiment
For calls to AnalyzeSentiment or if AnnotateTextRequest.Features.extract_document_sentiment is set to true, this field will contain the sentiment for the sentence.
$this