Trying to get a .png image using wordcloud from a book on Bible. The word 'Jesus' is stemmed to 'Jesu'. Is there a way to give an exception to this one word alone? Strangely, 'Moses' is not stemmed.
{file_content = open("Wheres_Heaven.txt").read()}
{wordcloud = WordCloud(stopwords=None, background_color = 'white', width=1200, height=1000, max_words = 500, ).generate(file_content)}
{plt.figure( figsize=(20,10) )
{plt.imshow(wordcloud)}
{plt.axis('off')}
{plt.savefig('Heaven.png')}
{plt.show()}
If you have version 1.8.1 then you can put "Jesu" in stopwords.
The logic is when it sees both "Jesu" and "Jesus" in the text, the code assumes it is a plural. Apparently the text has no "Mose", which is why that was not treated as plural.