public static final class EntityMention.Builder extends GeneratedMessageV3.Builder<EntityMention.Builder> implements EntityMentionOrBuilder
Represents a mention for an entity in the text. Currently, proper noun mentions are supported.Protobuf type
google.cloud.language.v1.EntityMention
Modifier and Type | Method and Description |
---|---|
EntityMention.Builder |
addRepeatedField(Descriptors.FieldDescriptor field,
Object value) |
EntityMention |
build() |
EntityMention |
buildPartial() |
EntityMention.Builder |
clear() |
EntityMention.Builder |
clearField(Descriptors.FieldDescriptor field) |
EntityMention.Builder |
clearOneof(Descriptors.OneofDescriptor oneof) |
EntityMention.Builder |
clearSentiment()
For calls to [AnalyzeEntitySentiment][] or if
[AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] is set to
true, this field will contain the sentiment expressed for this mention of
the entity in the provided document.
|
EntityMention.Builder |
clearText()
The mention text.
|
EntityMention.Builder |
clearType()
The type of the entity mention.
|
EntityMention.Builder |
clone() |
EntityMention |
getDefaultInstanceForType() |
static Descriptors.Descriptor |
getDescriptor() |
Descriptors.Descriptor |
getDescriptorForType() |
Sentiment |
getSentiment()
For calls to [AnalyzeEntitySentiment][] or if
[AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] is set to
true, this field will contain the sentiment expressed for this mention of
the entity in the provided document.
|
Sentiment.Builder |
getSentimentBuilder()
For calls to [AnalyzeEntitySentiment][] or if
[AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] is set to
true, this field will contain the sentiment expressed for this mention of
the entity in the provided document.
|
SentimentOrBuilder |
getSentimentOrBuilder()
For calls to [AnalyzeEntitySentiment][] or if
[AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] is set to
true, this field will contain the sentiment expressed for this mention of
the entity in the provided document.
|
TextSpan |
getText()
The mention text.
|
TextSpan.Builder |
getTextBuilder()
The mention text.
|
TextSpanOrBuilder |
getTextOrBuilder()
The mention text.
|
EntityMention.Type |
getType()
The type of the entity mention.
|
int |
getTypeValue()
The type of the entity mention.
|
boolean |
hasSentiment()
For calls to [AnalyzeEntitySentiment][] or if
[AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] is set to
true, this field will contain the sentiment expressed for this mention of
the entity in the provided document.
|
boolean |
hasText()
The mention text.
|
protected GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
EntityMention.Builder |
mergeFrom(CodedInputStream input,
ExtensionRegistryLite extensionRegistry) |
EntityMention.Builder |
mergeFrom(EntityMention other) |
EntityMention.Builder |
mergeFrom(Message other) |
EntityMention.Builder |
mergeSentiment(Sentiment value)
For calls to [AnalyzeEntitySentiment][] or if
[AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] is set to
true, this field will contain the sentiment expressed for this mention of
the entity in the provided document.
|
EntityMention.Builder |
mergeText(TextSpan value)
The mention text.
|
EntityMention.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields) |
EntityMention.Builder |
setField(Descriptors.FieldDescriptor field,
Object value) |
EntityMention.Builder |
setRepeatedField(Descriptors.FieldDescriptor field,
int index,
Object value) |
EntityMention.Builder |
setSentiment(Sentiment.Builder builderForValue)
For calls to [AnalyzeEntitySentiment][] or if
[AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] is set to
true, this field will contain the sentiment expressed for this mention of
the entity in the provided document.
|
EntityMention.Builder |
setSentiment(Sentiment value)
For calls to [AnalyzeEntitySentiment][] or if
[AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] is set to
true, this field will contain the sentiment expressed for this mention of
the entity in the provided document.
|
EntityMention.Builder |
setText(TextSpan.Builder builderForValue)
The mention text.
|
EntityMention.Builder |
setText(TextSpan value)
The mention text.
|
EntityMention.Builder |
setType(EntityMention.Type value)
The type of the entity mention.
|
EntityMention.Builder |
setTypeValue(int value)
The type of the entity mention.
|
EntityMention.Builder |
setUnknownFields(UnknownFieldSet unknownFields) |
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
mergeDelimitedFrom, mergeDelimitedFrom
mergeFrom
public static final Descriptors.Descriptor getDescriptor()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable
in class GeneratedMessageV3.Builder<EntityMention.Builder>
public EntityMention.Builder clear()
clear
in interface Message.Builder
clear
in interface MessageLite.Builder
clear
in class GeneratedMessageV3.Builder<EntityMention.Builder>
public Descriptors.Descriptor getDescriptorForType()
getDescriptorForType
in interface Message.Builder
getDescriptorForType
in interface MessageOrBuilder
getDescriptorForType
in class GeneratedMessageV3.Builder<EntityMention.Builder>
public EntityMention getDefaultInstanceForType()
getDefaultInstanceForType
in interface MessageLiteOrBuilder
getDefaultInstanceForType
in interface MessageOrBuilder
public EntityMention build()
build
in interface Message.Builder
build
in interface MessageLite.Builder
public EntityMention buildPartial()
buildPartial
in interface Message.Builder
buildPartial
in interface MessageLite.Builder
public EntityMention.Builder clone()
clone
in interface Message.Builder
clone
in interface MessageLite.Builder
clone
in class GeneratedMessageV3.Builder<EntityMention.Builder>
public EntityMention.Builder setField(Descriptors.FieldDescriptor field, Object value)
setField
in interface Message.Builder
setField
in class GeneratedMessageV3.Builder<EntityMention.Builder>
public EntityMention.Builder clearField(Descriptors.FieldDescriptor field)
clearField
in interface Message.Builder
clearField
in class GeneratedMessageV3.Builder<EntityMention.Builder>
public EntityMention.Builder clearOneof(Descriptors.OneofDescriptor oneof)
clearOneof
in interface Message.Builder
clearOneof
in class GeneratedMessageV3.Builder<EntityMention.Builder>
public EntityMention.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
setRepeatedField
in interface Message.Builder
setRepeatedField
in class GeneratedMessageV3.Builder<EntityMention.Builder>
public EntityMention.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
addRepeatedField
in interface Message.Builder
addRepeatedField
in class GeneratedMessageV3.Builder<EntityMention.Builder>
public EntityMention.Builder mergeFrom(Message other)
mergeFrom
in interface Message.Builder
mergeFrom
in class AbstractMessage.Builder<EntityMention.Builder>
public EntityMention.Builder mergeFrom(EntityMention other)
public final boolean isInitialized()
isInitialized
in interface MessageLiteOrBuilder
isInitialized
in class GeneratedMessageV3.Builder<EntityMention.Builder>
public EntityMention.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
mergeFrom
in interface Message.Builder
mergeFrom
in interface MessageLite.Builder
mergeFrom
in class AbstractMessage.Builder<EntityMention.Builder>
IOException
public boolean hasText()
The mention text.
.google.cloud.language.v1.TextSpan text = 1;
hasText
in interface EntityMentionOrBuilder
public TextSpan getText()
The mention text.
.google.cloud.language.v1.TextSpan text = 1;
getText
in interface EntityMentionOrBuilder
public EntityMention.Builder setText(TextSpan value)
The mention text.
.google.cloud.language.v1.TextSpan text = 1;
public EntityMention.Builder setText(TextSpan.Builder builderForValue)
The mention text.
.google.cloud.language.v1.TextSpan text = 1;
public EntityMention.Builder mergeText(TextSpan value)
The mention text.
.google.cloud.language.v1.TextSpan text = 1;
public EntityMention.Builder clearText()
The mention text.
.google.cloud.language.v1.TextSpan text = 1;
public TextSpan.Builder getTextBuilder()
The mention text.
.google.cloud.language.v1.TextSpan text = 1;
public TextSpanOrBuilder getTextOrBuilder()
The mention text.
.google.cloud.language.v1.TextSpan text = 1;
getTextOrBuilder
in interface EntityMentionOrBuilder
public int getTypeValue()
The type of the entity mention.
.google.cloud.language.v1.EntityMention.Type type = 2;
getTypeValue
in interface EntityMentionOrBuilder
public EntityMention.Builder setTypeValue(int value)
The type of the entity mention.
.google.cloud.language.v1.EntityMention.Type type = 2;
value
- The enum numeric value on the wire for type to set.public EntityMention.Type getType()
The type of the entity mention.
.google.cloud.language.v1.EntityMention.Type type = 2;
getType
in interface EntityMentionOrBuilder
public EntityMention.Builder setType(EntityMention.Type value)
The type of the entity mention.
.google.cloud.language.v1.EntityMention.Type type = 2;
value
- The type to set.public EntityMention.Builder clearType()
The type of the entity mention.
.google.cloud.language.v1.EntityMention.Type type = 2;
public boolean hasSentiment()
For calls to [AnalyzeEntitySentiment][] or if [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] is set to true, this field will contain the sentiment expressed for this mention of the entity in the provided document.
.google.cloud.language.v1.Sentiment sentiment = 3;
hasSentiment
in interface EntityMentionOrBuilder
public Sentiment getSentiment()
For calls to [AnalyzeEntitySentiment][] or if [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] is set to true, this field will contain the sentiment expressed for this mention of the entity in the provided document.
.google.cloud.language.v1.Sentiment sentiment = 3;
getSentiment
in interface EntityMentionOrBuilder
public EntityMention.Builder setSentiment(Sentiment value)
For calls to [AnalyzeEntitySentiment][] or if [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] is set to true, this field will contain the sentiment expressed for this mention of the entity in the provided document.
.google.cloud.language.v1.Sentiment sentiment = 3;
public EntityMention.Builder setSentiment(Sentiment.Builder builderForValue)
For calls to [AnalyzeEntitySentiment][] or if [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] is set to true, this field will contain the sentiment expressed for this mention of the entity in the provided document.
.google.cloud.language.v1.Sentiment sentiment = 3;
public EntityMention.Builder mergeSentiment(Sentiment value)
For calls to [AnalyzeEntitySentiment][] or if [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] is set to true, this field will contain the sentiment expressed for this mention of the entity in the provided document.
.google.cloud.language.v1.Sentiment sentiment = 3;
public EntityMention.Builder clearSentiment()
For calls to [AnalyzeEntitySentiment][] or if [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] is set to true, this field will contain the sentiment expressed for this mention of the entity in the provided document.
.google.cloud.language.v1.Sentiment sentiment = 3;
public Sentiment.Builder getSentimentBuilder()
For calls to [AnalyzeEntitySentiment][] or if [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] is set to true, this field will contain the sentiment expressed for this mention of the entity in the provided document.
.google.cloud.language.v1.Sentiment sentiment = 3;
public SentimentOrBuilder getSentimentOrBuilder()
For calls to [AnalyzeEntitySentiment][] or if [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] is set to true, this field will contain the sentiment expressed for this mention of the entity in the provided document.
.google.cloud.language.v1.Sentiment sentiment = 3;
getSentimentOrBuilder
in interface EntityMentionOrBuilder
public final EntityMention.Builder setUnknownFields(UnknownFieldSet unknownFields)
setUnknownFields
in interface Message.Builder
setUnknownFields
in class GeneratedMessageV3.Builder<EntityMention.Builder>
public final EntityMention.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
mergeUnknownFields
in interface Message.Builder
mergeUnknownFields
in class GeneratedMessageV3.Builder<EntityMention.Builder>
Copyright © 2022 Google LLC. All rights reserved.