Class Sentence.Builder (2.96.0)

public static final class Sentence.Builder extends GeneratedMessage.Builder<Sentence.Builder> implements SentenceOrBuilder

Represents a sentence in the input document.

Protobuf type google.cloud.language.v2.Sentence

Implements

SentenceOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

build()

public Sentence build()
Returns
Type Description
Sentence

buildPartial()

public Sentence buildPartial()
Returns
Type Description
Sentence

clear()

public Sentence.Builder clear()
Returns
Type Description
Sentence.Builder
Overrides

clearSentiment()

public Sentence.Builder clearSentiment()

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
Sentence.Builder

clearText()

public Sentence.Builder clearText()

The sentence text.

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

Returns
Type Description
Sentence.Builder

getDefaultInstanceForType()

public Sentence getDefaultInstanceForType()
Returns
Type Description
Sentence

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getSentiment()

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

getSentimentBuilder()

public Sentiment.Builder getSentimentBuilder()

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.Builder

getSentimentOrBuilder()

public 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