I was jsut wondering is there any direct function or method to make a word cloud in matlab. I have managed to count the repeatitions of every word so far.
Thank you, vish
Best Answer
As of R2017b, you can create word clouds from text data using thewordcloud funtion.
The removeWords function only removes specific words. It won't remove phrases like you might expect.
The word clouds are showing n-grams, therefore you are looking remove common n-grams. To do so, use the removeNgrams function. Each phrase should be a 1x2 string array (see the "thou art" and "thou dost" example in the removeNgrams Documentation)
If you are interested in the top n-grams in a bag-of-n-grams model (which you used to create the word cloud), you can use the topkngrams function.
Alternatively (and this is not the preferred approach), you can extract the WordData from a word cloud object:
Best Answer