Interface SentenceOrBuilder (2.49.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.v2.Sentiment sentiment = 2;

Returns
Type Description
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.v2.Sentiment sentiment = 2;

Returns
Type Description
SentimentOrBuilder

getText()

public abstract TextSpan getText()

The sentence text.

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

Returns
Type Description
TextSpan

The text.

getTextOrBuilder()

public abstract TextSpanOrBuilder getTextOrBuilder()

The sentence text.

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

Returns
Type Description
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.v2.Sentiment sentiment = 2;

Returns
Type Description
boolean

Whether the sentiment field is set.

hasText()

public abstract boolean hasText()

The sentence text.

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

Returns
Type Description
boolean

Whether the text field is set.