import wordcloud
import pandas as pd
import matplotlib.pyplot as plt
# text = open(path.join(d, 'constitution.txt')).read()
# # Generate a word cloud image
# wordcloud = WordCloud().generate(text)
# cloud = wordcloud.WordCloud(max_words = 2000, width = 1600,height = 900).generate(' '.join(data.Sentence))
# plt.figure(figsize=(20,12))
# plt.imshow(cloud)
# plt.axis("off")
# plt.savefig("WordCloudGoT.png")
data = pd.read_excel('aruodas20210401.xlsx')
cloud = wordcloud.WordCloud(max_words = 20, width = 1600,height = 900).generate(' '.join(data['Aprašymas']))
plt.figure(figsize=(20,12))
plt.imshow(cloud)
plt.axis("off")
plt.savefig("WordCloudGoT.png")
Comments