Entity
class Entity extends Message
Represents a phrase in the text that is a known entity, such as a person, an organization, or location. The API associates information, such as salience and mentions, with entities.
Protobuf type Google\Cloud\Language\V1beta2\Entity
Methods
No description
The representative name for the entity.
The representative name for the entity.
The entity type.
The entity type.
Metadata associated with the entity.
Metadata associated with the entity.
The salience score associated with the entity in the [0, 1.0] range.
The salience score associated with the entity in the [0, 1.0] range.
The mentions of this entity in the input document. The API currently supports proper noun mentions.
The mentions of this entity in the input document. The API currently supports proper noun mentions.
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 aggregate sentiment expressed for this entity in the provided document.
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 aggregate sentiment expressed for this entity in the provided document.
Details
at line 67
__construct()
at line 78
string
getName()
The representative name for the entity.
Generated from protobuf field string name = 1;
at line 89
setName(string $var)
The representative name for the entity.
Generated from protobuf field string name = 1;
at line 101
int
getType()
The entity type.
Generated from protobuf field .google.cloud.language.v1beta2.Entity.Type type = 2;
at line 112
setType(int $var)
The entity type.
Generated from protobuf field .google.cloud.language.v1beta2.Entity.Type type = 2;
at line 126
RepeatedField
getMetadata()
Metadata associated with the entity.
Currently, Wikipedia URLs and Knowledge Graph MIDs are provided, if available. The associated keys are "wikipedia_url" and "mid", respectively.
Generated from protobuf field map<string, string> metadata = 3;
at line 139
setMetadata(array|RepeatedField $var)
Metadata associated with the entity.
Currently, Wikipedia URLs and Knowledge Graph MIDs are provided, if available. The associated keys are "wikipedia_url" and "mid", respectively.
Generated from protobuf field map<string, string> metadata = 3;
at line 155
float
getSalience()
The salience score associated with the entity in the [0, 1.0] range.
The salience score for an entity provides information about the importance or centrality of that entity to the entire document text. Scores closer to 0 are less salient, while scores closer to 1.0 are highly salient.
Generated from protobuf field float salience = 4;
at line 170
setSalience(float $var)
The salience score associated with the entity in the [0, 1.0] range.
The salience score for an entity provides information about the importance or centrality of that entity to the entire document text. Scores closer to 0 are less salient, while scores closer to 1.0 are highly salient.
Generated from protobuf field float salience = 4;
at line 183
RepeatedField
getMentions()
The mentions of this entity in the input document. The API currently supports proper noun mentions.
Generated from protobuf field repeated .google.cloud.language.v1beta2.EntityMention mentions = 5;
at line 195
setMentions(array|RepeatedField $var)
The mentions of this entity in the input document. The API currently supports proper noun mentions.
Generated from protobuf field repeated .google.cloud.language.v1beta2.EntityMention mentions = 5;
at line 210
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 aggregate sentiment expressed for this entity in the provided document.
Generated from protobuf field .google.cloud.language.v1beta2.Sentiment sentiment = 6;
at line 224
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 aggregate sentiment expressed for this entity in the provided document.
Generated from protobuf field .google.cloud.language.v1beta2.Sentiment sentiment = 6;