Reference documentation and code samples for the Cloud Natural Language V1 Client class Type.
The type of the entity. For most entity types, the associated metadata is a
Wikipedia URL (wikipedia_url) and Knowledge Graph MID (mid). The table
below lists the associated fields for entities that have different
metadata.
Protobuf type google.cloud.language.v1.Entity.Type
Namespace
Google \ Cloud \ Language \ V1 \ EntityMethods
static::name
| Parameter | |
|---|---|
| Name | Description |
value |
mixed
|
static::value
| Parameter | |
|---|---|
| Name | Description |
name |
mixed
|
Constants
UNKNOWN
Value: 0Unknown
Generated from protobuf enum UNKNOWN = 0;
PERSON
Value: 1Person
Generated from protobuf enum PERSON = 1;
LOCATION
Value: 2Location
Generated from protobuf enum LOCATION = 2;
ORGANIZATION
Value: 3Organization
Generated from protobuf enum ORGANIZATION = 3;
EVENT
Value: 4Event
Generated from protobuf enum EVENT = 4;
WORK_OF_ART
Value: 5Artwork
Generated from protobuf enum WORK_OF_ART = 5;
CONSUMER_GOOD
Value: 6Consumer product
Generated from protobuf enum CONSUMER_GOOD = 6;
OTHER
Value: 7Other types of entities
Generated from protobuf enum OTHER = 7;
PHONE_NUMBER
Value: 9Phone number The metadata lists the phone number, formatted according to local convention, plus whichever additional elements appear in the text:
number- the actual number, broken down into sections as per local conventionnational_prefix- country code, if detectedarea_code- region or area code, if detectedextension- phone extension (to be dialed after connection), if detected
Generated from protobuf enum PHONE_NUMBER = 9;
ADDRESS
Value: 10Address The metadata identifies the street number and locality plus whichever additional elements appear in the text:
street_number- street numberlocality- city or townstreet_name- street/route name, if detectedpostal_code- postal code, if detectedcountry- country, if detected<broad_region- administrative area, such as the state, if detectednarrow_region- smaller administrative area, such as county, if detectedsublocality- used in Asian addresses to demark a district within a city, if detected
Generated from protobuf enum ADDRESS = 10;
DATE
Value: 11Date The metadata identifies the components of the date:
year- four digit year, if detectedmonth- two digit month number, if detectedday- two digit day number, if detected
Generated from protobuf enum DATE = 11;
NUMBER
Value: 12Number The metadata is the number itself.
Generated from protobuf enum NUMBER = 12;
PRICE
Value: 13Price
The metadata identifies the value and currency.
Generated from protobuf enum PRICE = 13;