public sealed class Entity : IMessage<Entity>, IEquatable<Entity>, IDeepCloneable<Entity>, IBufferMessage, IMessage
Reference documentation and code samples for the Cloud Natural Language v2 API class 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.
For most entity types, the metadata is a Wikipedia URL (wikipedia_url)
and Knowledge Graph MID (mid), if they are available. For the metadata
associated with other entity types, see the Type table below.
For calls to [AnalyzeEntitySentiment][] or if
[AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v2.AnnotateTextRequest.Features.extract_entity_sentiment]
is set to true, this field will contain the aggregate sentiment expressed
for this entity in the provided document.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThis documentation is for the \u003ccode\u003eEntity\u003c/code\u003e class within the Google Cloud Natural Language v2 API, specifically version 1.0.0-beta04, which represents a recognized entity (like a person or organization) found in text.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eEntity\u003c/code\u003e class provides information about entities, including their mentions in the document via \u003ccode\u003eMentions\u003c/code\u003e, associated metadata like Wikipedia URLs in \u003ccode\u003eMetadata\u003c/code\u003e, the entity's \u003ccode\u003eName\u003c/code\u003e, and its \u003ccode\u003eType\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eWhen sentiment analysis is enabled, the \u003ccode\u003eSentiment\u003c/code\u003e property of the \u003ccode\u003eEntity\u003c/code\u003e class details the overall sentiment expressed toward that entity in the document.\u003c/p\u003e\n"],["\u003cp\u003eThis class inherits from \u003ccode\u003eobject\u003c/code\u003e and implements multiple interfaces like \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, facilitating integration with Google's Protobuf system.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eEntity\u003c/code\u003e class also has two constructors: one default and one that lets you make an entity that is the same as another.\u003c/p\u003e\n"]]],[],null,[]]