publicfinalclass EntityextendsGeneratedMessageV3implementsEntityOrBuilder
Represents a phrase in the text that is a known entity, such as
a person, an organization, or location. The API associates information, such
as probability and mentions, with entities.
Protobuf type google.cloud.language.v2.Entity
Inherited Members
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)
Static Fields
MENTIONS_FIELD_NUMBER
publicstaticfinalintMENTIONS_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
publicstaticfinalintMETADATA_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
NAME_FIELD_NUMBER
publicstaticfinalintNAME_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
SENTIMENT_FIELD_NUMBER
publicstaticfinalintSENTIMENT_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
TYPE_FIELD_NUMBER
publicstaticfinalintTYPE_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
Static Methods
getDefaultInstance()
publicstaticEntitygetDefaultInstance()
| Returns |
| Type |
Description |
Entity |
getDescriptor()
publicstaticfinalDescriptors.DescriptorgetDescriptor()
newBuilder()
publicstaticEntity.BuildernewBuilder()
newBuilder(Entity prototype)
publicstaticEntity.BuildernewBuilder(Entityprototype)
| Parameter |
| Name |
Description |
prototype |
Entity
|
publicstaticEntityparseDelimitedFrom(InputStreaminput)
| Returns |
| Type |
Description |
Entity |
publicstaticEntityparseDelimitedFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
| Returns |
| Type |
Description |
Entity |
parseFrom(byte[] data)
publicstaticEntityparseFrom(byte[]data)
| Parameter |
| Name |
Description |
data |
byte[]
|
| Returns |
| Type |
Description |
Entity |
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
publicstaticEntityparseFrom(byte[]data,ExtensionRegistryLiteextensionRegistry)
| Returns |
| Type |
Description |
Entity |
parseFrom(ByteString data)
publicstaticEntityparseFrom(ByteStringdata)
| Returns |
| Type |
Description |
Entity |
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
publicstaticEntityparseFrom(ByteStringdata,ExtensionRegistryLiteextensionRegistry)
| Returns |
| Type |
Description |
Entity |
publicstaticEntityparseFrom(CodedInputStreaminput)
| Returns |
| Type |
Description |
Entity |
publicstaticEntityparseFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
| Returns |
| Type |
Description |
Entity |
publicstaticEntityparseFrom(InputStreaminput)
| Returns |
| Type |
Description |
Entity |
publicstaticEntityparseFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
| Returns |
| Type |
Description |
Entity |
parseFrom(ByteBuffer data)
publicstaticEntityparseFrom(ByteBufferdata)
| Returns |
| Type |
Description |
Entity |
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
publicstaticEntityparseFrom(ByteBufferdata,ExtensionRegistryLiteextensionRegistry)
| Returns |
| Type |
Description |
Entity |
parser()
publicstaticParser<Entity>parser()
Methods
publicbooleancontainsMetadata(Stringkey)
Metadata associated with the entity.
For the metadata
associated with other entity types, see the Type table below.
map<string, string> metadata = 3;
| Parameter |
| Name |
Description |
key |
String
|
equals(Object obj)
publicbooleanequals(Objectobj)
| Parameter |
| Name |
Description |
obj |
Object
|
Overrides
getDefaultInstanceForType()
publicEntitygetDefaultInstanceForType()
| Returns |
| Type |
Description |
Entity |
getMentions(int index)
publicEntityMentiongetMentions(intindex)
The mentions of this entity in the input document. The API currently
supports proper noun mentions.
repeated .google.cloud.language.v2.EntityMention mentions = 5;
| Parameter |
| Name |
Description |
index |
int
|
getMentionsCount()
publicintgetMentionsCount()
The mentions of this entity in the input document. The API currently
supports proper noun mentions.
repeated .google.cloud.language.v2.EntityMention mentions = 5;
| Returns |
| Type |
Description |
int |
getMentionsList()
publicList<EntityMention>getMentionsList()
The mentions of this entity in the input document. The API currently
supports proper noun mentions.
repeated .google.cloud.language.v2.EntityMention mentions = 5;
getMentionsOrBuilder(int index)
publicEntityMentionOrBuildergetMentionsOrBuilder(intindex)
The mentions of this entity in the input document. The API currently
supports proper noun mentions.
repeated .google.cloud.language.v2.EntityMention mentions = 5;
| Parameter |
| Name |
Description |
index |
int
|
getMentionsOrBuilderList()
publicList<?extendsEntityMentionOrBuilder>getMentionsOrBuilderList()
The mentions of this entity in the input document. The API currently
supports proper noun mentions.
repeated .google.cloud.language.v2.EntityMention mentions = 5;
| Returns |
| Type |
Description |
List<? extends com.google.cloud.language.v2.EntityMentionOrBuilder> |
publicMap<String,String>getMetadata()
publicintgetMetadataCount()
Metadata associated with the entity.
For the metadata
associated with other entity types, see the Type table below.
map<string, string> metadata = 3;
| Returns |
| Type |
Description |
int |
publicMap<String,String>getMetadataMap()
Metadata associated with the entity.
For the metadata
associated with other entity types, see the Type table below.
map<string, string> metadata = 3;
publicStringgetMetadataOrDefault(Stringkey,StringdefaultValue)
Metadata associated with the entity.
For the metadata
associated with other entity types, see the Type table below.
map<string, string> metadata = 3;
| Returns |
| Type |
Description |
String |
publicStringgetMetadataOrThrow(Stringkey)
Metadata associated with the entity.
For the metadata
associated with other entity types, see the Type table below.
map<string, string> metadata = 3;
| Parameter |
| Name |
Description |
key |
String
|
| Returns |
| Type |
Description |
String |
getName()
The representative name for the entity.
string name = 1;
| Returns |
| Type |
Description |
String |
The name.
|
getNameBytes()
publicByteStringgetNameBytes()
The representative name for the entity.
string name = 1;
| Returns |
| Type |
Description |
ByteString |
The bytes for name.
|
getParserForType()
publicParser<Entity>getParserForType()
Overrides
getSentiment()
publicSentimentgetSentiment()
For calls to [AnalyzeEntitySentiment][] or if
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.v2.Sentiment sentiment = 6;
| Returns |
| Type |
Description |
Sentiment |
The sentiment.
|
getSentimentOrBuilder()
publicSentimentOrBuildergetSentimentOrBuilder()
For calls to [AnalyzeEntitySentiment][] or if
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.v2.Sentiment sentiment = 6;
getSerializedSize()
publicintgetSerializedSize()
| Returns |
| Type |
Description |
int |
Overrides
getType()
publicEntity.TypegetType()
The entity type.
.google.cloud.language.v2.Entity.Type type = 2;
getTypeValue()
The entity type.
.google.cloud.language.v2.Entity.Type type = 2;
| Returns |
| Type |
Description |
int |
The enum numeric value on the wire for type.
|
hasSentiment()
publicbooleanhasSentiment()
For calls to [AnalyzeEntitySentiment][] or if
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.v2.Sentiment sentiment = 6;
| Returns |
| Type |
Description |
boolean |
Whether the sentiment field is set.
|
hashCode()
| Returns |
| Type |
Description |
int |
Overrides
internalGetFieldAccessorTable()
protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Overrides
internalGetMapFieldReflection(int number)
protectedMapFieldReflectionAccessorinternalGetMapFieldReflection(intnumber)
| Parameter |
| Name |
Description |
number |
int
|
| Returns |
| Type |
Description |
com.google.protobuf.MapFieldReflectionAccessor |
Overrides
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)
isInitialized()
publicfinalbooleanisInitialized()
Overrides
newBuilderForType()
publicEntity.BuildernewBuilderForType()
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protectedEntity.BuildernewBuilderForType(GeneratedMessageV3.BuilderParentparent)
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protectedObjectnewInstance(GeneratedMessageV3.UnusedPrivateParameterunused)
| Returns |
| Type |
Description |
Object |
Overrides
toBuilder()
publicEntity.BuildertoBuilder()
writeTo(CodedOutputStream output)
publicvoidwriteTo(CodedOutputStreamoutput)
Overrides