Skip to main content


Showing posts from November, 2017

Amazing Word clouds using python

Ever wondered how word clouds are generated from a big text corpus? In this post we learn how to make interesting word clouds using simple natural language processing and python.

What are word clouds?
Word clouds are a way of representing some of the most important words or some of the most occurring words from the big text corpus.

In this post we will consider the some speeches by George Bush as our test corpus and make a word cloud from the words that occur the most in the speeches.

Steps taken

Load the speeches and store them in a variableRemove all the stopwords, stop words are words like 'the', 'and', 'this' and they can be removed for our current purpose.Remove all the punctuation'sConstruct word cloud consisting of 100 most frequent words and save the image
Lets have a look at the code

The above code produces the following image as the output

Now, the above code produces a simple image, we can mask and try to make our word cloud more interesting by …