Comments (5)
you are not instantiating a WordCloud object. Somewhere there should be wordcloud = WordCloud()
from word_cloud.
Did you import it?
from word_cloud.
Yes.
Installed it and imported it.
On Wed 25 Mar 2015 at 19:39 Andreas Mueller [email protected]
wrote:
Did you import it?
—
Reply to this email directly or view it on GitHub
#50 (comment).
from word_cloud.
can you give the exact code please?
from word_cloud.
from os import path
import matplotlib.pyplot as plt
from wordcloud import WordCloud
final_topics = open("yourfile.txt")
curr_topic = 0
for line in final_topics:
#line = line.strip()[line.rindex("'") + 2:]
scores = [float(x.split("")[0]) for x in line.split(" + ")]
words = [x.split("")[1] for x in line.split(" + ")]
freqs = []
wordcloud.fit_words
print(words)
for word, score in zip(words, scores):
freqs.append((word, score))
elements = wordcloud.fit_words(freqs, width=120, height=120)
wordcloud.draw(elements, "gs_topic_%d.png" % (curr_topic),
width=120, height=120)
curr_topic += 1
final_topics.close()
On 26 Mar 2015, at 15:48, Andreas Mueller [email protected] wrote:
can you give the exact code please?
—
Reply to this email directly or view it on GitHub #50 (comment).
from word_cloud.
Related Issues (20)
- ValueError: Only supported for TrueType fonts HOT 33
- Fails to build with Python 3.12 HOT 2
- Custom and radom Font Size
- Unable to download wordcloud using python3.12 HOT 7
- MatplotlibDeprecationWarning: The get_cmap function was deprecated in Matplotlib 3.7 HOT 1
- MatplotlibDeprecationWarning: The get_cmap function was deprecated in Matplotlib 3.7 HOT 2
- Error in installing library wordcloud HOT 4
- ValueError: anchor not supported for multiline text HOT 3
- Maybe get rid of Cython HOT 4
- ValueError: Only supported for TrueType fonts on Databricks
- How to fix? : python setup.py egg_info did not run successfully. HOT 3
- Wordcloud not Support Multiple Languages in Once? Unicodes, Emoji, Glyphs all are not Works.
- Generating a wordcloud from a dictionary of terms with their frequencies HOT 1
- "AttributeError: 'ImageDraw' object has no attribute 'textbbox'" on Ubuntu 20.04 HOT 1
- test_cli_as_executable test failed on 1.9.3
- Works on Android Termux - quick tips
- Wordcloud returns an error when files exceed 15MB HOT 3
- Keeping together multi-word tokens
- clickable wordclouds
- Questions about Copilot + Open Source Software Hierarchy
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from word_cloud.