Entity
import type { Entity } from "https://googleapis.deno.dev/v1/language:v2.ts";
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.
interface Entity {
mentions?: EntityMention[];
metadata?: {};
[key: string]: string;
name?: string;
sentiment?: Sentiment;
type?:
} | "UNKNOWN"
| "PERSON"
| "LOCATION"
| "ORGANIZATION"
| "EVENT"
| "WORK_OF_ART"
| "CONSUMER_GOOD"
| "OTHER"
| "PHONE_NUMBER"
| "ADDRESS"
| "DATE"
| "NUMBER"
| "PRICE";
§Properties
§
mentions?: EntityMention[]
[src]The mentions of this entity in the input document. The API currently supports proper noun mentions.
§
metadata?: {}
[src][key: string]: string;
Metadata associated with the entity. For the metadata associated with other entity types, see the Type table below.