Added more info prints
This commit is contained in:
parent
a490422587
commit
3ad1c000ab
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -7,4 +7,6 @@ images
|
||||||
*.json
|
*.json
|
||||||
*.log
|
*.log
|
||||||
*.txt
|
*.txt
|
||||||
rawtext.py
|
*.pdf
|
||||||
|
rawtext.py
|
||||||
|
pdfcloud.py
|
4
cloud.py
4
cloud.py
|
@ -148,6 +148,7 @@ wc_obj = WordCloud(font_path="ARIALUNI.TTF",
|
||||||
contour_color=cc
|
contour_color=cc
|
||||||
)
|
)
|
||||||
|
|
||||||
|
print("Processing words...", end=" ", flush=True)
|
||||||
words = wc_obj.process_text(' '.join(comments))
|
words = wc_obj.process_text(' '.join(comments))
|
||||||
|
|
||||||
with open(f"wordlists/{args.w}.csv") as list:
|
with open(f"wordlists/{args.w}.csv") as list:
|
||||||
|
@ -173,8 +174,11 @@ for (word, freq) in words.items():
|
||||||
out_freq *= args.boost
|
out_freq *= args.boost
|
||||||
|
|
||||||
out_dict[word] = out_freq
|
out_dict[word] = out_freq
|
||||||
|
print("Done!")
|
||||||
|
|
||||||
|
print("Create cloud...", end=" ", flush=True)
|
||||||
wordcloud = wc_obj.generate_from_frequencies(out_dict)
|
wordcloud = wc_obj.generate_from_frequencies(out_dict)
|
||||||
|
print("Done!")
|
||||||
|
|
||||||
if args.color is True:
|
if args.color is True:
|
||||||
wordcloud.recolor(color_func=colors)
|
wordcloud.recolor(color_func=colors)
|
||||||
|
|
Loading…
Reference in a new issue