Home:ALL Converter>To generate wordcloud in python jupyter notebook environment

To generate wordcloud in python jupyter notebook environment

Ask Time:2017-03-16T01:14:40         Author:user103987

Json Formatter

I am working corpus analysis for non english text, but I am facing several problem like clustering with k-means Now I am facing problem in generating wordcloud in python 3.5.2 jupyter notebook I installed wordcloud with command pip install wordcloud than process following code

# Simple WordCloud
from os import path
from scipy.misc import imread
import matplotlib.pyplot as plt
import random

from wordcloud import WordCloud, STOPWORDS

text = 'all your base are belong to us all of your base base base'
wordcloud = WordCloud(font_path='/Library/Fonts/Verdana.ttf',
                      relative_scaling = 1.0,
                      stopwords = 'to of'
                      ).generate(text)
plt.imshow(wordcloud)
plt.axis("off")
plt.show()

But got following error

ImportError Traceback (most recent call last) in () 5 import random 6 ----> 7 from wordcloud import WordCloud, STOPWORDS 8 9 text = 'all your base are belong to us all of your base base base'

ImportError: No module named 'wordcloud'

plz help me in this concern.

Author:user103987,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/42816472/to-generate-wordcloud-in-python-jupyter-notebook-environment
yy