<jupyter_start><jupyter_text>Apply stopwords<jupyter_code>stopwords = set(STOPWORDS)
wordcloud = WordCloud(width=400, height=300, max_font_size= 50, max_words=2000, stopwords=stopwords, background_color="white").generate(text)
fig = plt.figure(figsize=(10,10))
plt.imshow(wordcloud, interpolation="bilinear")
plt.tight_layout(pad=0)
plt.axis("off")
plt.show();
#plt.savefig('wordcloud_square_multiply.png', facecolor=fig.get_facecolor(), edgecolor='none', bbox_inches='tight')
mask = np.array(Image.open("x_cover.png"))
wordcloud = WordCloud(width=800, height=600, max_font_size= 80, mask=mask, stopwords=stopwords, max_words=200, background_color="white").generate(text)
fig = plt.figure(figsize=(10,10))
plt.imshow(wordcloud, interpolation="bilinear")
plt.tight_layout(pad=0)
plt.axis("off")
plt.savefig('wordcloud_x_multiply.png', facecolor=fig.get_facecolor(), edgecolor='none', bbox_inches='tight')
plt.show();
text = open('divide.txt').read()
mask = np.array(Image.open("divide_cover.png"))
wordcloud = WordCloud(width=800, height=600, max_font_size=70, mask=mask, max_words=200,stopwords=stopwords, background_color="white").generate(text)
fig = plt.figure(figsize=(10,10))
plt.imshow(wordcloud, interpolation="bilinear")
plt.tight_layout(pad=0)
plt.axis("off")
plt.savefig('wordcloud_divide.png', facecolor=fig.get_facecolor(), edgecolor='none', bbox_inches='tight')
plt.show();
text = open('plus.txt').read()
mask = np.array(Image.open("plus_cover.png"))
wordcloud = WordCloud(width=800, height=600, max_font_size=70, mask=mask, max_words=200, stopwords=stopwords, background_color="white").generate(text)
plt.figure(figsize=(10,10))
plt.imshow(wordcloud, interpolation="bilinear")
plt.tight_layout(pad=0)
plt.axis("off")
plt.show();<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.17607223476297967, 'fraction_numerical': 0.03668171557562077, 'mean_word_length': 11.398601398601398, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '370175', 'license': 'MIT', 'n_tokens_mistral': 707, 'n_tokens_neox': 635, 'n_words': 84, 'path': 'edsheeran_wordcloud.ipynb', 'repo_name': 'mesodiar/edsheeran-wordcloud', 'size': '1772'}