Closed rjalexa closed 9 months ago
Sorry found this is already supported:
word_frequencies = {word: data["count"] for word, data in result.items()}
# Create a WordCloud object
wordcloud = WordCloud(
width=800, height=400, background_color="white"
).generate_from_frequencies(word_frequencies)
not a bug but rather a question/request
I have a complex word routine that extracts relevant terms from a text, it is based on the Part of Speech and another couple of NLP routines.
I generate a dictionary as follows:
{"term1": 12, "term2": 6 ..... }
where "term1" is one of the words selected from my source text and the value is its frequency in it.Is there any way to feed this structure so that it takes the frequency to determine the size and build the wordcloud from it?
Happy 2024