Creating a word cloud to explore unstructured text data
A word cloud is a visualization of text data where the actual words are displayed and the size of the word is determined by the frequency of the word into the whole corpus. This is one of the easy ways to understand the term frequency in a corpus of documents. Though in this recipe, you will learn to create a word cloud and explain it for general audience.
Getting ready
To implement this recipe, you will require a corpus of documents and the wordcloud
library. First, install the wordcloud
library by running the following code:
install.packages("wordcloud", dependencies = TRUE)
Since you will require a corpus of documents, let's create the corpus by doing the search through PubMed with the key "Deep Learning"
. You will need the following libraries to create the corpus:
pubmed.mineR
RISmed
tm
How to do it…
Let's perform the following steps to create a word cloud:
- Perform a literature search through PubMed and the retrieve abstract texts.
- Perform...