Comments (6)
print_topics
used to print the topics (hence the name, which is misleading now), but users complained that gensim is a library and as such shouldn't print anything. And I agree.
What I can do, is return a string instead of None. That way you'll be able to do print print_topics()
and see output like in the log. It will make calling print_topics() from shell ugly though, so maybe I'll make that conditional (a parameter flag or smt).
Yeah now that I think of it, I'll rename print_topics
to show_topics
, and make print_topics
an alias with that flag turned on.
from gensim.
Went ahead and took a shot at something like the change described in 5b10b6d85e6d3e366a06867f5ec321c69fe3db20. Not sure whether it's exactly what @piskvorky had in mind (e.g. I also changed print_topic
) but it does the trick for me!
from gensim.
The other option that would be appropriate for a library is to have
that function return a list of strings, one for each topic.
On Thu, Aug 25, 2011 at 5:16 PM, strongh
[email protected]
wrote:
Went ahead and took a shot at something like the change described in 5b10b6d85e6d3e366a06867f5ec321c69fe3db20. Not sure whether it's exactly what @piskvorky had in mind (e.g. I also changed
print_topic
) but it does the trick for me!Reply to this email directly or view it on GitHub:
#47 (comment)
RRR
from gensim.
@DataJunkie my version of show_topics
returns a list of strings per topic when the keyword argument formatted
is True
. The strings are formatted as in the log files. Is this what you were thinking?
from gensim.
@strongh great, that is indeed what I had in mind :) I'll have a look & test & merge when I get back home (end of month). Thanks!
from gensim.
Fixed in #50 . Let me know if there are any further issues.
from gensim.
Related Issues (20)
- Merging corpora requires converting itertools chain object to list object HOT 2
- Inconsistent documentation for LdaSeqModel
- Is there anyway to adjust the weight of the node? HOT 1
- Deprecation Warning for sparsetools namespace HOT 2
- simple_processing() str_iterator issue HOT 3
- Pretrained model for doc2vec HOT 1
- File "<string>", line 111, in finalize_options AttributeError: 'dict' object has no attribute '__NUMPY_SETUP__' when installing gensim 3.8.3 with pip install
- add functions to reproduce preprocessing matching `GoogleNews`, `GLoVe`, etc pretrained word-vectors HOT 1
- generate change log for 4.3.2
- Windows wheel broken for Python 3.10
- Compiled extensions are very slow when built with Cython 3.0.0
- Tests fail: RuntimeError: Compiled extensions are unavailable. HOT 3
- TypeError: __randomstate_ctor() takes from 0 to 1 positional arguments but 2 were given HOT 2
- Search feature on website is broken HOT 1
- How to open doc2vec trained on an older version of gensim? HOT 3
- is the summarization module removed in the newest version of gensim, i find it nowhere in the documentation? HOT 1
- Vocabulary size is much smaller than requested HOT 2
- Docs still reference fasttext.build_vocab sentences parameter HOT 1
- EnsembleLDA with pyLDAvis visualisation
- library stubs are missing HOT 1
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 gensim.