Interface EntityMentionOrBuilder (2.7.0)

publicinterface EntityMentionOrBuilderextendsMessageOrBuilder

Implements

MessageOrBuilder

Methods

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

Returns
Type Description

getText()

publicabstractTextSpangetText()

The mention text.

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

Returns
Type Description
TextSpan

The text.

getTextOrBuilder()

publicabstractTextSpanOrBuildergetTextOrBuilder()

The mention text.

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

Returns
Type Description

getType()

publicabstractEntityMention.TypegetType()

The type of the entity mention.

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

Returns
Type Description
EntityMention.Type

The type.

getTypeValue()

publicabstractintgetTypeValue()

The type of the entity mention.

.google.cloud.language.v1beta2.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.v1beta2.Sentiment sentiment = 3;

Returns
Type Description
boolean

Whether the sentiment field is set.

hasText()

publicabstractbooleanhasText()

The mention text.

.google.cloud.language.v1beta2.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.