Cloud Natural Language V1 Client - Class Sentence (0.28.5)

Reference documentation and code samples for the Cloud Natural Language V1 Client class Sentence.

Represents a sentence in the input document.

Generated from protobuf message google.cloud.language.v1.Sentence

Methods

__construct

Constructor.

Parameters
Name
Description
data
array

Optional. Data for populating the Message object.

↳ text
↳ sentiment
Google\Cloud\Language\V1\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.

Returns
Type
Description

hasText

clearText

setText

The sentence text.

Parameter
Name
Description
Returns
Type
Description
$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.

Returns
Type
Description

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.

Parameter
Name
Description
Returns
Type
Description
$this
Design a Mobile Site
View Site in Mobile | Classic
Share by: