Interface EntityMentionOrBuilder (2.79.0)

publicinterface EntityMentionOrBuilderextendsMessageOrBuilder

Implements

MessageOrBuilder

Methods

getProbability()

publicabstractfloatgetProbability()

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
Type Description
float

The probability.

getSentiment()

publicabstractSentimentgetSentiment()

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.v2.Sentiment sentiment = 3;

Returns
Type Description
Sentiment

The sentiment.

getSentimentOrBuilder()

publicabstractSentimentOrBuildergetSentimentOrBuilder()

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.v2.Sentiment sentiment = 3;

Returns
Type Description
SentimentOrBuilder

getText()

publicabstractTextSpangetText()

The mention text.

.google.cloud.language.v2.TextSpan text = 1;

Returns
Type Description
TextSpan

The text.

getTextOrBuilder()

publicabstractTextSpanOrBuildergetTextOrBuilder()

The mention text.

.google.cloud.language.v2.TextSpan text = 1;

Returns
Type Description
TextSpanOrBuilder

getType()

publicabstractEntityMention.TypegetType()

The type of the entity mention.

.google.cloud.language.v2.EntityMention.Type type = 2;

Returns
Type Description
EntityMention.Type

The type.

getTypeValue()

publicabstractintgetTypeValue()

The type of the entity mention.

.google.cloud.language.v2.EntityMention.Type type = 2;

Returns
Type Description
int

The enum numeric value on the wire for type.

hasSentiment()

publicabstractbooleanhasSentiment()

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.v2.Sentiment sentiment = 3;

Returns
Type Description
boolean

Whether the sentiment field is set.

hasText()

publicabstractbooleanhasText()

The mention text.

.google.cloud.language.v2.TextSpan text = 1;

Returns
Type Description
boolean

Whether the text field is set.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月30日 UTC.