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
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 using the following code.
The output produced by the above code is
The mask used for the above code was downloaded from
https://www.flaticon.com/free-icon/presentation_432036#
Vigenere Decipher Algorithm
Vigenere Cipher Algorithm
Counting Sort
Quick Sort using Recursion
Data Encryption using Caesar Cipher
Data Decryption using Caesar Cipher
LCM of 2 numbers
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 variable
- Remove all the stopwords, stop words are words like 'the', 'and', 'this' and they can be removed for our current purpose.
- Remove all the punctuation's
- Construct 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 using the following code.
The output produced by the above code is
The mask used for the above code was downloaded from
https://www.flaticon.com/free-icon/presentation_432036#
Vigenere Decipher Algorithm
Vigenere Cipher Algorithm
Counting Sort
Quick Sort using Recursion
Data Encryption using Caesar Cipher
Data Decryption using Caesar Cipher
LCM of 2 numbers
Comments
Post a Comment