Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

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?: {
[key: string]: string;
}
[src]

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

§
name?: string
[src]

The representative name for the entity.

§
sentiment?: Sentiment
[src]

For calls to AnalyzeEntitySentiment 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?: "UNKNOWN" | "PERSON" | "LOCATION" | "ORGANIZATION" | "EVENT" | "WORK_OF_ART" | "CONSUMER_GOOD" | "OTHER" | "PHONE_NUMBER" | "ADDRESS" | "DATE" | "NUMBER" | "PRICE"
[src]

The entity type.