Reference documentation and code samples for the Cloud Natural Language V1beta2 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.v1beta2.Entity.Type
Methods
name
Parameter | |
---|---|
Name | Description |
value |
mixed
|
value
Parameter | |
---|---|
Name | Description |
name |
mixed
|
Constants
UNKNOWN
Value: 0
Unknown
Generated from protobuf enum UNKNOWN = 0;
PERSON
Value: 1
Person
Generated from protobuf enum PERSON = 1;
LOCATION
Value: 2
Location
Generated from protobuf enum LOCATION = 2;
ORGANIZATION
Value: 3
Organization
Generated from protobuf enum ORGANIZATION = 3;
EVENT
Value: 4
Event
Generated from protobuf enum EVENT = 4;
WORK_OF_ART
Value: 5
Artwork
Generated from protobuf enum WORK_OF_ART = 5;
CONSUMER_GOOD
Value: 6
Consumer product
Generated from protobuf enum CONSUMER_GOOD = 6;
OTHER
Value: 7
Other types of entities
Generated from protobuf enum OTHER = 7;
PHONE_NUMBER
Value: 9
Phone 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: 10
Address 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: 11
Date 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: 12
Number The metadata is the number itself.
Generated from protobuf enum NUMBER = 12;
PRICE
Value: 13
Price
The metadata identifies the value
and currency
.
Generated from protobuf enum PRICE = 13;