public sealed class Entity : IMessage<Entity>, IEquatable<Entity>, IDeepCloneable<Entity>, IBufferMessage, IMessage
Reference documentation and code samples for the Google Cloud Natural Language v1 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 salience 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.
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.
For calls to [AnalyzeEntitySentiment][] or if
[AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.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\u003eThe \u003ccode\u003eEntity\u003c/code\u003e class in the Google Cloud Natural Language v1 API represents a known entity within text, such as a person, organization, or location, with associated information like salience and mentions.\u003c/p\u003e\n"],["\u003cp\u003eThe API documentation provides versioning details, with version 3.7.0 being the latest and a range of prior versions from 3.6.0 down to 2.2.0, allowing for review of changes over time.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eEntity\u003c/code\u003e class inherits from \u003ccode\u003eObject\u003c/code\u003e and implements several interfaces including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, providing functionalities for message handling, equality comparison, deep cloning, and buffer operations.\u003c/p\u003e\n"],["\u003cp\u003eKey properties of the \u003ccode\u003eEntity\u003c/code\u003e class include \u003ccode\u003eMentions\u003c/code\u003e, \u003ccode\u003eMetadata\u003c/code\u003e, \u003ccode\u003eName\u003c/code\u003e, \u003ccode\u003eSalience\u003c/code\u003e, \u003ccode\u003eSentiment\u003c/code\u003e, and \u003ccode\u003eType\u003c/code\u003e, which detail the entity's occurrences, associated information, representative name, importance score, sentiment, and type, respectively.\u003c/p\u003e\n"],["\u003cp\u003eIt is possible to call and get the Sentiment associated with the Entity when using the [AnalyzeEntitySentiment] function or by setting extract_entity_sentiment to true.\u003c/p\u003e\n"]]],[],null,[]]