I am trying to add stopwords to be removed from my word clouds. It seems that all of a sudden, my additional stopwords are not being added. It was working before.
I have boiled down the problem to what is shown here along with the first word cloud from the loop. You can see at the top that the word "product" is still present even though I added it to the list of stopwords. The other two stopwords were properly removed. I have collocations set to False.
I tried with version 1.5.0 and 1.6.0
from wordcloud import WordCloud, STOPWORDS
import pandas as pd
import collections
import matplotlib.pyplot as plt
for i in range(20):
print(i)
wordcloud = WordCloud(stopwords=["product", "and", "the"], background_color='white', collocations=False).generate(clusterStrings[i])
# Display the generated image:
plt.imshow(wordcloud, interpolation='bilinear')
plt.axis("off")
plt.show()
