public interface EntityOrBuilder extends MessageOrBuilder
Modifier and Type | Method and Description |
---|---|
boolean |
containsMetadata(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.
|
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.
|
List<? extends EntityMentionOrBuilder> |
getMentionsOrBuilderList()
The mentions of this entity in the input document.
|
Map<String,String> |
getMetadata()
Deprecated.
|
int |
getMetadataCount()
Metadata associated with the entity.
|
Map<String,String> |
getMetadataMap()
Metadata associated with the entity.
|
String |
getMetadataOrDefault(String key,
String defaultValue)
Metadata associated with the entity.
|
String |
getMetadataOrThrow(String key)
Metadata associated with the entity.
|
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.v1beta2.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.v1beta2.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.v1beta2.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
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.v1beta2.Entity.Type type = 2;
Entity.Type getType()
The entity type.
.google.cloud.language.v1beta2.Entity.Type type = 2;
int getMetadataCount()
Metadata associated with the entity. For most entity types, the metadata is a Wikipedia URL (`wikipedia_url`) and Knowledge Graph MID (`mid`), if they are available. For the metadata associated with other entity types, see the Type table below.
map<string, string> metadata = 3;
boolean containsMetadata(String key)
Metadata associated with the entity. For most entity types, the metadata is a Wikipedia URL (`wikipedia_url`) and Knowledge Graph MID (`mid`), if they are available. For the metadata associated with other entity types, see the Type table below.
map<string, string> metadata = 3;
@Deprecated Map<String,String> getMetadata()
getMetadataMap()
instead.Map<String,String> getMetadataMap()
Metadata associated with the entity. For most entity types, the metadata is a Wikipedia URL (`wikipedia_url`) and Knowledge Graph MID (`mid`), if they are available. For the metadata associated with other entity types, see the Type table below.
map<string, string> metadata = 3;
String getMetadataOrDefault(String key, String defaultValue)
Metadata associated with the entity. For most entity types, the metadata is a Wikipedia URL (`wikipedia_url`) and Knowledge Graph MID (`mid`), if they are available. For the metadata associated with other entity types, see the Type table below.
map<string, string> metadata = 3;
String getMetadataOrThrow(String key)
Metadata associated with the entity. For most entity types, the metadata is a Wikipedia URL (`wikipedia_url`) and Knowledge Graph MID (`mid`), if they are available. For the metadata associated with other entity types, see the Type table below.
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;
List<EntityMention> getMentionsList()
The mentions of this entity in the input document. The API currently supports proper noun mentions.
repeated .google.cloud.language.v1beta2.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.v1beta2.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.v1beta2.EntityMention mentions = 5;
List<? extends EntityMentionOrBuilder> getMentionsOrBuilderList()
The mentions of this entity in the input document. The API currently supports proper noun mentions.
repeated .google.cloud.language.v1beta2.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.v1beta2.EntityMention mentions = 5;
boolean hasSentiment()
For calls to [AnalyzeEntitySentiment][] or if [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1beta2.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.v1beta2.Sentiment sentiment = 6;
Sentiment getSentiment()
For calls to [AnalyzeEntitySentiment][] or if [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1beta2.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.v1beta2.Sentiment sentiment = 6;
SentimentOrBuilder getSentimentOrBuilder()
For calls to [AnalyzeEntitySentiment][] or if [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1beta2.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.v1beta2.Sentiment sentiment = 6;
Copyright © 2022 Google LLC. All rights reserved.