public interface EntityOrBuilder extends MessageOrBuilder
Modifier and Type | Method and Description |
---|---|
boolean |
containsMetadata(java.lang.String key)
Metadata associated with the entity.
|
EntityMention |
getMentions(int index)
The mentions of this entity in the input document.
|
int |
getMentionsCount()
The mentions of this entity in the input document.
|
java.util.List<EntityMention> |
getMentionsList()
The mentions of this entity in the input document.
|
EntityMentionOrBuilder |
getMentionsOrBuilder(int index)
The mentions of this entity in the input document.
|
java.util.List<? extends EntityMentionOrBuilder> |
getMentionsOrBuilderList()
The mentions of this entity in the input document.
|
java.util.Map<java.lang.String,java.lang.String> |
getMetadata()
Deprecated.
|
int |
getMetadataCount()
Metadata associated with the entity.
|
java.util.Map<java.lang.String,java.lang.String> |
getMetadataMap()
Metadata associated with the entity.
|
java.lang.String |
getMetadataOrDefault(java.lang.String key,
java.lang.String defaultValue)
Metadata associated with the entity.
|
java.lang.String |
getMetadataOrThrow(java.lang.String key)
Metadata associated with the entity.
|
java.lang.String |
getName()
The representative name for the entity.
|
ByteString |
getNameBytes()
The representative name for the entity.
|
float |
getSalience()
The salience score associated with the entity in the [0, 1.0] range.
|
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 aggregate sentiment expressed for this
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 aggregate sentiment expressed for this
entity in the provided document.
|
Entity.Type |
getType()
The entity type.
|
int |
getTypeValue()
The entity type.
|
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 aggregate sentiment expressed for this
entity in the provided document.
|
findInitializationErrors, getAllFields, getDefaultInstanceForType, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
isInitialized
java.lang.String getName()
The representative name for the entity.
string name = 1;
ByteString getNameBytes()
The representative name for the entity.
string name = 1;
int getTypeValue()
The entity type.
.google.cloud.language.v1.Entity.Type type = 2;
Entity.Type getType()
The entity type.
.google.cloud.language.v1.Entity.Type type = 2;
int getMetadataCount()
Metadata associated with the entity. Currently, Wikipedia URLs and Knowledge Graph MIDs are provided, if available. The associated keys are "wikipedia_url" and "mid", respectively.
map<string, string> metadata = 3;
boolean containsMetadata(java.lang.String key)
Metadata associated with the entity. Currently, Wikipedia URLs and Knowledge Graph MIDs are provided, if available. The associated keys are "wikipedia_url" and "mid", respectively.
map<string, string> metadata = 3;
@Deprecated java.util.Map<java.lang.String,java.lang.String> getMetadata()
getMetadataMap()
instead.java.util.Map<java.lang.String,java.lang.String> getMetadataMap()
Metadata associated with the entity. Currently, Wikipedia URLs and Knowledge Graph MIDs are provided, if available. The associated keys are "wikipedia_url" and "mid", respectively.
map<string, string> metadata = 3;
java.lang.String getMetadataOrDefault(java.lang.String key, java.lang.String defaultValue)
Metadata associated with the entity. Currently, Wikipedia URLs and Knowledge Graph MIDs are provided, if available. The associated keys are "wikipedia_url" and "mid", respectively.
map<string, string> metadata = 3;
java.lang.String getMetadataOrThrow(java.lang.String key)
Metadata associated with the entity. Currently, Wikipedia URLs and Knowledge Graph MIDs are provided, if available. The associated keys are "wikipedia_url" and "mid", respectively.
map<string, string> metadata = 3;
float getSalience()
The salience score associated with the entity in the [0, 1.0] range. The salience score for an entity provides information about the importance or centrality of that entity to the entire document text. Scores closer to 0 are less salient, while scores closer to 1.0 are highly salient.
float salience = 4;
java.util.List<EntityMention> getMentionsList()
The mentions of this entity in the input document. The API currently supports proper noun mentions.
repeated .google.cloud.language.v1.EntityMention mentions = 5;
EntityMention getMentions(int index)
The mentions of this entity in the input document. The API currently supports proper noun mentions.
repeated .google.cloud.language.v1.EntityMention mentions = 5;
int getMentionsCount()
The mentions of this entity in the input document. The API currently supports proper noun mentions.
repeated .google.cloud.language.v1.EntityMention mentions = 5;
java.util.List<? extends EntityMentionOrBuilder> getMentionsOrBuilderList()
The mentions of this entity in the input document. The API currently supports proper noun mentions.
repeated .google.cloud.language.v1.EntityMention mentions = 5;
EntityMentionOrBuilder getMentionsOrBuilder(int index)
The mentions of this entity in the input document. The API currently supports proper noun mentions.
repeated .google.cloud.language.v1.EntityMention mentions = 5;
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 aggregate sentiment expressed for this entity in the provided document.
.google.cloud.language.v1.Sentiment sentiment = 6;
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 aggregate sentiment expressed for this entity in the provided document.
.google.cloud.language.v1.Sentiment sentiment = 6;
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 aggregate sentiment expressed for this entity in the provided document.
.google.cloud.language.v1.Sentiment sentiment = 6;