Try now in the
Open Cloud »
(no sign-in required)

Wikipedia Word Clouds

Make word cloud graphics from Wikipedia articles.

Run the code to get the text of a Wikipedia article. Try other topics, like airplane or tom_hanks:

Note: the code will return Missing[NotAvailable] if theres no such Wikipedia entry.

SHOW/HIDE DETAILS

This gets the text of the Wikipedia article on frogs and gives it the name text. The text is very long, so the code is followed with a semicolon (;), which keeps it from printing the text:

In[1]:=
X

Use StringTake to see the first 1,000 characters of the text:

In[2]:=
X
Out[2]=

HIDE DETAILS
In[1]:=
X
Out[1]=

Make a word cloud from the text:

Note: run the code in the previous step first to define text.

In[1]:=
X
Out[1]=

Get rid of unimportant words:

SHOW/HIDE DETAILS

The and and are the most common words in this text, but not the most important:

In[1]:=
X
Out[1]=

Remove the unimportant words from the text with DeleteStopwords:

In[2]:=
X
Out[2]=

HIDE DETAILS
In[1]:=
X
Out[1]=

Treat uppercase and lowercase words the same:

SHOW/HIDE DETAILS

ToLowerCase makes text all lowercase:

In[1]:=
X
Out[1]=

Before making the word cloud, make the text lowercase so that, for example, Frog and frog are considered the same:

In[2]:=
X
Out[2]=

HIDE DETAILS
In[1]:=
X
Out[1]=

Share ItMake a Wikipedia word cloud website:

SHOW/HIDE DETAILS

Deploy a form that asks for a topic and gives a word cloud for the Wikipedia article on that topic:

In[1]:=
X
Out[1]=

Click the link in the output to visit the site.

Share the link by right-clicking it and choosing Copy Address. Paste the link into an email, tweet, or other message.

HIDE DETAILS
In[1]:=
X
Out[1]=