Interface SentenceOrBuilder (2.34.0)

public interface SentenceOrBuilder extends MessageOrBuilder

Implements

MessageOrBuilder

Methods

getSentiment()

public abstract Sentiment 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.

.google.cloud.language.v1.Sentiment sentiment = 2;

Returns
TypeDescription
Sentiment

The sentiment.

getSentimentOrBuilder()

public abstract SentimentOrBuilder getSentimentOrBuilder()

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

.google.cloud.language.v1.Sentiment sentiment = 2;

Returns
TypeDescription
SentimentOrBuilder

getText()

public abstract TextSpan getText()

The sentence text.

.google.cloud.language.v1.TextSpan text = 1;

Returns
TypeDescription
TextSpan

The text.

getTextOrBuilder()

public abstract TextSpanOrBuilder getTextOrBuilder()

The sentence text.

.google.cloud.language.v1.TextSpan text = 1;

Returns
TypeDescription
TextSpanOrBuilder

hasSentiment()

public abstract boolean hasSentiment()

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

.google.cloud.language.v1.Sentiment sentiment = 2;

Returns
TypeDescription
boolean

Whether the sentiment field is set.

hasText()

public abstract boolean hasText()

The sentence text.

.google.cloud.language.v1.TextSpan text = 1;

Returns
TypeDescription
boolean

Whether the text field is set.