Package com.google.cloud.language.v2
Interface EntityMentionOrBuilder
-
- All Superinterfaces:
com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
- All Known Implementing Classes:
EntityMention
,EntityMention.Builder
public interface EntityMentionOrBuilder extends com.google.protobuf.MessageOrBuilder
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description float
getProbability()
Probability score associated with the entity.Sentiment
getSentiment()
For calls to [AnalyzeEntitySentiment][] or if [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v2.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.v2.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.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.v2.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.-
Methods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDefaultInstanceForType, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
-
-
-
Method Detail
-
hasText
boolean hasText()
The mention text.
.google.cloud.language.v2.TextSpan text = 1;
- Returns:
- Whether the text field is set.
-
getText
TextSpan getText()
The mention text.
.google.cloud.language.v2.TextSpan text = 1;
- Returns:
- The text.
-
getTextOrBuilder
TextSpanOrBuilder getTextOrBuilder()
The mention text.
.google.cloud.language.v2.TextSpan text = 1;
-
getTypeValue
int getTypeValue()
The type of the entity mention.
.google.cloud.language.v2.EntityMention.Type type = 2;
- Returns:
- The enum numeric value on the wire for type.
-
getType
EntityMention.Type getType()
The type of the entity mention.
.google.cloud.language.v2.EntityMention.Type type = 2;
- Returns:
- The type.
-
hasSentiment
boolean hasSentiment()
For calls to [AnalyzeEntitySentiment][] or if [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v2.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.v2.Sentiment sentiment = 3;
- Returns:
- Whether the sentiment field is set.
-
getSentiment
Sentiment getSentiment()
For calls to [AnalyzeEntitySentiment][] or if [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v2.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.v2.Sentiment sentiment = 3;
- Returns:
- The sentiment.
-
getSentimentOrBuilder
SentimentOrBuilder getSentimentOrBuilder()
For calls to [AnalyzeEntitySentiment][] or if [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v2.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.v2.Sentiment sentiment = 3;
-
getProbability
float getProbability()
Probability score associated with the entity. The score shows the probability of the entity mention being the entity type. The score is in (0, 1] range.
float probability = 4;
- Returns:
- The probability.
-
-