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 there’s no such Wikipedia entry.
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:
Use StringTake to see the first 1,000 characters of the text:
Make a word cloud from the text:
Note: run the code in the previous step first to define text.
Get rid of unimportant words:
“The” and “and” are the most common words in this text, but not the most important:
Remove the unimportant words from the text with DeleteStopwords:
Treat uppercase and lowercase words the same:
ToLowerCase makes text all lowercase:
Before making the word cloud, make the text lowercase so that, for example, “Frog” and “frog” are considered the same:
Share It—Make a Wikipedia word cloud website:
Deploy a form that asks for a topic and gives a word cloud for the Wikipedia article on that topic:
Click on the link in the output to visit the site.
Tell the world about your creation by sharing the link via email, tweet, or other message.