public final class EntityMention extends GeneratedMessageV3 implements EntityMentionOrBuilder
Represents a mention for an entity in the text. Currently, proper noun
mentions are supported.
Protobuf type google.cloud.language.v1.EntityMention
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>)
Static Fields
SENTIMENT_FIELD_NUMBER
public static final int SENTIMENT_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
TEXT_FIELD_NUMBER
public static final int TEXT_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
TYPE_FIELD_NUMBER
public static final int TYPE_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
Static Methods
getDefaultInstance()
public static EntityMention getDefaultInstance()
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
newBuilder()
public static EntityMention.Builder newBuilder()
newBuilder(EntityMention prototype)
public static EntityMention.Builder newBuilder(EntityMention prototype)
public static EntityMention parseDelimitedFrom(InputStream input)
public static EntityMention parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(byte[] data)
public static EntityMention parseFrom(byte[] data)
Parameter |
---|
Name | Description |
data | byte[]
|
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static EntityMention parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteString data)
public static EntityMention parseFrom(ByteString data)
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static EntityMention parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static EntityMention parseFrom(CodedInputStream input)
public static EntityMention parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static EntityMention parseFrom(InputStream input)
public static EntityMention parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteBuffer data)
public static EntityMention parseFrom(ByteBuffer data)
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static EntityMention parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
parser()
public static Parser<EntityMention> parser()
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter |
---|
Name | Description |
obj | Object
|
Overrides
getDefaultInstanceForType()
public EntityMention getDefaultInstanceForType()
getParserForType()
public Parser<EntityMention> getParserForType()
Overrides
getSentiment()
public Sentiment getSentiment()
For calls to [AnalyzeEntitySentiment][] or if
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;
Returns |
---|
Type | Description |
Sentiment | The sentiment.
|
getSentimentOrBuilder()
public SentimentOrBuilder getSentimentOrBuilder()
For calls to [AnalyzeEntitySentiment][] or if
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;
getSerializedSize()
public int getSerializedSize()
Returns |
---|
Type | Description |
int | |
Overrides
getText()
public TextSpan getText()
The mention text.
.google.cloud.language.v1.TextSpan text = 1;
getTextOrBuilder()
public TextSpanOrBuilder getTextOrBuilder()
The mention text.
.google.cloud.language.v1.TextSpan text = 1;
getType()
public EntityMention.Type getType()
The type of the entity mention.
.google.cloud.language.v1.EntityMention.Type type = 2;
getTypeValue()
public int getTypeValue()
The type of the entity mention.
.google.cloud.language.v1.EntityMention.Type type = 2;
Returns |
---|
Type | Description |
int | The enum numeric value on the wire for type.
|
hasSentiment()
public boolean hasSentiment()
For calls to [AnalyzeEntitySentiment][] or if
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;
Returns |
---|
Type | Description |
boolean | Whether the sentiment field is set.
|
hasText()
The mention text.
.google.cloud.language.v1.TextSpan text = 1;
Returns |
---|
Type | Description |
boolean | Whether the text field is set.
|
hashCode()
Returns |
---|
Type | Description |
int | |
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
newBuilderForType()
public EntityMention.Builder newBuilderForType()
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected EntityMention.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Overrides
toBuilder()
public EntityMention.Builder toBuilder()
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Overrides