class EntityMention extends Message

Represents a mention for an entity in the text. Currently, proper noun mentions are supported.

Protobuf type Google\Cloud\Language\V1beta2\EntityMention

Methods

__construct()

No description

getText()

The mention text.

setText(TextSpan $var)

The mention text.

int
getType()

The type of the entity mention.

setType(int $var)

The type of the entity mention.

getSentiment()

For calls to [AnalyzeEntitySentiment][] or if [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1beta2.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.

setSentiment(Sentiment $var)

For calls to [AnalyzeEntitySentiment][] or if [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1beta2.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.

Details

at line 41
__construct()

at line 52
TextSpan getText()

The mention text.

Generated from protobuf field .google.cloud.language.v1beta2.TextSpan text = 1;

Return Value

TextSpan

at line 63
setText(TextSpan $var)

The mention text.

Generated from protobuf field .google.cloud.language.v1beta2.TextSpan text = 1;

Parameters

TextSpan $var

at line 75
int getType()

The type of the entity mention.

Generated from protobuf field .google.cloud.language.v1beta2.EntityMention.Type type = 2;

Return Value

int

at line 86
setType(int $var)

The type of the entity mention.

Generated from protobuf field .google.cloud.language.v1beta2.EntityMention.Type type = 2;

Parameters

int $var

at line 101
Sentiment getSentiment()

For calls to [AnalyzeEntitySentiment][] or if [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1beta2.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.

Generated from protobuf field .google.cloud.language.v1beta2.Sentiment sentiment = 3;

Return Value

Sentiment

at line 115
setSentiment(Sentiment $var)

For calls to [AnalyzeEntitySentiment][] or if [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1beta2.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.

Generated from protobuf field .google.cloud.language.v1beta2.Sentiment sentiment = 3;

Parameters

Sentiment $var