@@ -241,22 +241,54 @@ class Type(enum.IntEnum):
241241class Entity (object ):
242242 class Type (enum .IntEnum ):
243243 """
244- The type of the entity.
244+ The type of the entity. For most entity types, the associated metadata
245+ is a Wikipedia URL (``wikipedia_url``) and Knowledge Graph MID
246+ (``mid``). The table below lists the associated fields for entities that
247+ have different metadata.
245248
246249 Attributes:
247250 UNKNOWN (int): Unknown
248251 PERSON (int): Person
249252 LOCATION (int): Location
250253 ORGANIZATION (int): Organization
251254 EVENT (int): Event
252- WORK_OF_ART (int): Work of art
253- CONSUMER_GOOD (int): Consumer goods
254- OTHER (int): Other types
255- PHONE_NUMBER (int): Phone number
256- ADDRESS (int): Address
257- DATE (int): Date
258- NUMBER (int): Number
259- PRICE (int): Price
255+ WORK_OF_ART (int): Artwork
256+ CONSUMER_GOOD (int): Consumer product
257+ OTHER (int): Other types of entities
258+ PHONE_NUMBER (int): Phone number The metadata lists the phone number, formatted according to
259+ local convention, plus whichever additional elements appear in the text:
260+
261+ .. raw:: html
262+
263+ <li><code>number</code> – the actual number, broken down into
264+ sections as per local convention</li> <li><code>national_prefix</code>
265+ – country code, if detected</li> <li><code>area_code</code> –
266+ region or area code, if detected</li> <li><code>extension</code> –
267+ phone extension (to be dialed after connection), if detected</li></ul>
268+ ADDRESS (int): Address The metadata identifies the street number and locality plus
269+ whichever additional elements appear in the text:
270+
271+ .. raw:: html
272+
273+ <li><code>street_number</code> – street number</li>
274+ <li><code>locality</code> – city or town</li>
275+ <li><code>street_name</code> – street/route name, if detected</li>
276+ <li><code>postal_code</code> – postal code, if detected</li>
277+ <li><code>country</code> – country, if detected</li>
278+ <li><code>broad_region</code> – administrative area, such as the
279+ state, if detected</li> <li><code>narrow_region</code> – smaller
280+ administrative area, such as county, if detected</li>
281+ <li><code>sublocality</code> – used in Asian addresses to demark a
282+ district within a city, if detected</li></ul>
283+ DATE (int): Date<br><br>
284+ The metadata identifies the components of the date:<ul>
285+ <li><code>year</code> – four digit year, if detected</li>
286+ <li><code>month</code> – two digit month number, if detected</li>
287+ <li><code>day</code> – two digit day number, if detected</li></ul>
288+ NUMBER (int): Number<br><br>
289+ The metadata is the number itself.
290+ PRICE (int): Price<br><br>
291+ The metadata identifies the <code>value</code> and <code>currency</code>.
260292 """
261293
262294 UNKNOWN = 0
0 commit comments