public static final class Sentence.Builder extends GeneratedMessageV3.Builder<Sentence.Builder> implements SentenceOrBuilder
Represents a sentence in the input document.
Protobuf type google.cloud.language.v1beta2.Sentence
Inherited Members
com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)
Static Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public Sentence.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Overrides
build()
buildPartial()
public Sentence buildPartial()
clear()
public Sentence.Builder clear()
Overrides
clearField(Descriptors.FieldDescriptor field)
public Sentence.Builder clearField(Descriptors.FieldDescriptor field)
Overrides
clearOneof(Descriptors.OneofDescriptor oneof)
public Sentence.Builder clearOneof(Descriptors.OneofDescriptor oneof)
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.v1beta2.Sentiment sentiment = 2;
clearText()
public Sentence.Builder clearText()
The sentence text.
.google.cloud.language.v1beta2.TextSpan text = 1;
clone()
public Sentence.Builder clone()
Overrides
getDefaultInstanceForType()
public Sentence getDefaultInstanceForType()
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
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.v1beta2.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.v1beta2.Sentiment sentiment = 2;
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.v1beta2.Sentiment sentiment = 2;
getText()
public TextSpan getText()
The sentence text.
.google.cloud.language.v1beta2.TextSpan text = 1;
getTextBuilder()
public TextSpan.Builder getTextBuilder()
The sentence text.
.google.cloud.language.v1beta2.TextSpan text = 1;
getTextOrBuilder()
public TextSpanOrBuilder getTextOrBuilder()
The sentence text.
.google.cloud.language.v1beta2.TextSpan text = 1;
hasSentiment()
public 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.v1beta2.Sentiment sentiment = 2;
Returns |
---|
Type | Description |
boolean | Whether the sentiment field is set.
|
hasText()
The sentence text.
.google.cloud.language.v1beta2.TextSpan text = 1;
Returns |
---|
Type | Description |
boolean | Whether the text field is set.
|
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
mergeFrom(Sentence other)
public Sentence.Builder mergeFrom(Sentence other)
public Sentence.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Overrides