EntityClass

EntityClass["type",name]
represents a class of entities of the specified type identified by name.

EntityClass["type",{property1value1,property2value2,}]
represents an implicitly defined entity class object whose members have values valuei for properties propertyi.

DetailsDetails

  • Possible entity types include "Country", "Movie", "Person", "Polyhedron", and many more. A list of all available entity types can be found by evaluating EntityValue[].
  • EntityClass expressions format in StandardForm using a print form of the entity name, retrieved either from a Wolfram server or from the system cache.
  • EntityClass expressions can be created by using the Ctrl+Equal WolframAlpha interface.
  • The identifier "type" is a string that represents the canonical entity type associated with a specific entity.
  • The identifier name is generally a string, but for certain entity types can also contain lists and integers.
  • Implicitly defined entity classes can be resolved into canonically named entities using EntityList[EntityClass["type",{property1value1,property2value2,}]].
  • An implicitly defined entity class represents all entities that fulfill all the specified restrictions on property values.
  • Property values in implicitly defined entity classes may make use of Quantity (and intervals of Quantity) for dimensional values, DateObject for dates, TakeLargest and TakeSmallest for ordinal selections, and ContainsAll, ContainsExactly, ContainsAny, ContainsOnly, ContainsNone for entities. Lists of entities are interpreted as ContainsAll, while a single entity is interpreted as ContainsAny[{entity}].

ExamplesExamplesopen allclose all

Basic Examples  (4)Basic Examples  (4)

Use the Ctrl+Equal WolframAlpha interface to discover particular entities:

In[1]:=
Click for copyable input

Represent all of the countries in Europe:

In[2]:=
Click for copyable input
Out[2]=

Get a list of all the countries:

In[3]:=
Click for copyable input
Out[3]=

Get a list of all chemicals that are alcohols:

In[4]:=
Click for copyable input
Out[4]//Shallow=

Get the population of all G8 countries:

In[5]:=
Click for copyable input
Out[5]=

A list of available entity classes can be found with EntityClassList:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

Create an implicitly defined entity class consisting of all elements whose densities fall within a specified range:

In[1]:=
Click for copyable input
Out[1]=

Explicitly list the elements:

In[2]:=
Click for copyable input
Out[2]=

Use an implicitly defined entity class to select the countries with the world's 10 longest borders and return them together with their corresponding border lengths:

In[1]:=
Click for copyable input
Out[1]=
Introduced in 2014
(10.0)
| Updated in 2015
(10.2)
Translate this page: