Entity

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 probability and mentions, with entities.

JSON representation
{
  "name": string,
  "type": enum (Type),
  "metadata": {
    string: string,
    ...
  },
  "mentions": [
    {
      object (EntityMention)
    }
  ],
  "sentiment": {
    object (Sentiment)
  }
}
Fields
name

string

The representative name for the entity.

type

enum (Type)

The entity type.

metadata

map (key: string, value: string)

Metadata associated with the entity.

For the metadata associated with other entity types, see the Type table below.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

mentions[]

object (EntityMention)

The mentions of this entity in the input document. The API currently supports proper noun mentions.

sentiment

object (Sentiment)

For calls to AnalyzeEntitySentimentRequest or if AnnotateTextRequest.Features.extract_entity_sentiment is set to true, this field will contain the aggregate sentiment expressed for this entity in the provided document.

Type

The type of the entity. The table below lists the associated fields for entities that have different metadata.

Enums
UNKNOWN Unknown
PERSON Person
LOCATION Location
ORGANIZATION Organization
EVENT Event
WORK_OF_ART Artwork