Reference documentation and code samples for the Natural Language V1beta2 API module Google::Cloud::Language::V1beta2::Entity::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.
Constants
UNKNOWN
value: 0 Unknown
PERSON
value: 1 Person
LOCATION
value: 2 Location
ORGANIZATION
value: 3 Organization
EVENT
value: 4 Event
WORK_OF_ART
value: 5 Artwork
CONSUMER_GOOD
value: 6 Consumer product
OTHER
value: 7 Other types of entities
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
convention
national_prefix - country code, if detected
area_code - region or area code, if detected
extension - phone extension (to be dialed after connection), if
detected
ADDRESS
value: 10
Address
The metadata identifies the street number and locality plus whichever
additional elements appear in the text:
street_number - street number
locality - city or town
street_name - street/route name, if detected
postal_code - postal code, if detected
country - country, if detected<
broad_region - administrative area, such as the state, if detected
narrow_region - smaller administrative area, such as county, if
detected
sublocality - used in Asian addresses to demark a district within a
city, if detected
DATE
value: 11
Date
The metadata identifies the components of the date:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-09 UTC."],[],[],null,["# Natural Language V1beta2 API - Module Google::Cloud::Language::V1beta2::Entity::Type (v0.14.0)\n\nVersion latestkeyboard_arrow_down\n\n- [0.14.0 (latest)](/ruby/docs/reference/google-cloud-language-v1beta2/latest/Google-Cloud-Language-V1beta2-Entity-Type)\n- [0.13.1](/ruby/docs/reference/google-cloud-language-v1beta2/0.13.1/Google-Cloud-Language-V1beta2-Entity-Type)\n- [0.12.0](/ruby/docs/reference/google-cloud-language-v1beta2/0.12.0/Google-Cloud-Language-V1beta2-Entity-Type)\n- [0.11.1](/ruby/docs/reference/google-cloud-language-v1beta2/0.11.1/Google-Cloud-Language-V1beta2-Entity-Type)\n- [0.10.2](/ruby/docs/reference/google-cloud-language-v1beta2/0.10.2/Google-Cloud-Language-V1beta2-Entity-Type)\n- [0.9.0](/ruby/docs/reference/google-cloud-language-v1beta2/0.9.0/Google-Cloud-Language-V1beta2-Entity-Type)\n- [0.8.1](/ruby/docs/reference/google-cloud-language-v1beta2/0.8.1/Google-Cloud-Language-V1beta2-Entity-Type)\n- [0.7.0](/ruby/docs/reference/google-cloud-language-v1beta2/0.7.0/Google-Cloud-Language-V1beta2-Entity-Type)\n- [0.6.0](/ruby/docs/reference/google-cloud-language-v1beta2/0.6.0/Google-Cloud-Language-V1beta2-Entity-Type)\n- [0.5.0](/ruby/docs/reference/google-cloud-language-v1beta2/0.5.0/Google-Cloud-Language-V1beta2-Entity-Type)\n- [0.4.5](/ruby/docs/reference/google-cloud-language-v1beta2/0.4.5/Google-Cloud-Language-V1beta2-Entity-Type) \nReference documentation and code samples for the Natural Language V1beta2 API module Google::Cloud::Language::V1beta2::Entity::Type.\n\nThe type of the entity. For most entity types, the associated metadata is a\nWikipedia URL (`wikipedia_url`) and Knowledge Graph MID (`mid`). The table\nbelow lists the associated fields for entities that have different\nmetadata.\n\nConstants\n---------\n\n### UNKNOWN\n\n**value:** 0 \nUnknown\n\n### PERSON\n\n**value:** 1 \nPerson\n\n### LOCATION\n\n**value:** 2 \nLocation\n\n### ORGANIZATION\n\n**value:** 3 \nOrganization\n\n### EVENT\n\n**value:** 4 \nEvent\n\n### WORK_OF_ART\n\n**value:** 5 \nArtwork\n\n### CONSUMER_GOOD\n\n**value:** 6 \nConsumer product\n\n### OTHER\n\n**value:** 7 \nOther types of entities\n\n### PHONE_NUMBER\n\n**value:** 9 \n\nPhone number\n\n\u003cbr /\u003e\n\nThe metadata lists the phone number, formatted according to local\nconvention, plus whichever additional elements appear in the text:\n\n- `number` - the actual number, broken down into sections as per local convention\n- `national_prefix` - country code, if detected\n- `area_code` - region or area code, if detected\n- `extension` - phone extension (to be dialed after connection), if detected\n\n### ADDRESS\n\n**value:** 10 \n\nAddress\n\n\u003cbr /\u003e\n\nThe metadata identifies the street number and locality plus whichever\nadditional elements appear in the text:\n\n- `street_number` - street number\n- `locality` - city or town\n- `street_name` - street/route name, if detected\n- `postal_code` - postal code, if detected\n- `country` - country, if detected\\\u003c\n- `broad_region` - administrative area, such as the state, if detected\n- `narrow_region` - smaller administrative area, such as county, if detected\n- `sublocality` - used in Asian addresses to demark a district within a city, if detected\n\n### DATE\n\n**value:** 11 \n\nDate\n\n\u003cbr /\u003e\n\nThe metadata identifies the components of the date:\n\n- `year` - four digit year, if detected\n- `month` - two digit month number, if detected\n- `day` - two digit day number, if detected\n\n### NUMBER\n\n**value:** 12 \nNumber\n\n\n\u003cbr /\u003e\n\nThe metadata is the number itself.\n\n### PRICE\n\n**value:** 13 \nPrice\n\n\n\u003cbr /\u003e\n\nThe metadata identifies the `value` and `currency`."]]