Access Wikipedia Content Using Wolfram Language Entities
A large and growing number of Wolfram Knowledgebase entities have been aligned to external sources, including Wikipedia.
Use WikipediaData to retrieve the pages of these entities and take the first sentence of each page.
In[1]:=
entities = {Entity["Person", "JohnLennon::cpwy3"],
Entity["Species", "Species:AcinonyxJubatus"],
Entity["City", {"NewYork", "NewYork", "UnitedStates"}],
Entity["MusicAct", "PinkFloyd::7523m"],
Entity["AdministrativeDivision", {"Florida", "UnitedStates"}]};
In[2]:=
summaries =
Table[{ent, First[TextSentences[WikipediaData[ent]]]}, {ent,
entities}];
Create a formatted collection of brief textual summaries about these entities.
show complete Wolfram Language input
Out[3]=
As a second example, retrieve Wikipedia articles about each past member of the Rolling Stones.
In[4]:=
stones = Entity["MusicAct", "TheRollingStones::99n5n"]["Members"]
Out[4]=
In[5]:=
stonesWiki = WikipediaData[stones];
Generate a collage of word clouds, weighted by article word counts.
show complete Wolfram Language input
Out[6]=