LDA and pLSA packages (preferably for Python)

2020-06-05 14:40发布

问题:

What packages for pLSA (Probabilistic Latent Semantic Analysis) and LDA (Latent Dirichlet Allocation) do you recommend for Python? Java and C++ are OK too, but Python preferred. Your experiences are highly appreciated.

There are many libs, so I don't know which to choose.

回答1:

Gensim seems to be most popular one. It's on PyPI so, you can just install it using

sudo easy_install gensim


回答2:

There's a good LDA example implementation in python that can be found here: http://www.cs.princeton.edu/~blei/topicmodeling.html and the tarball link is here: http://www.cs.princeton.edu/~blei/downloads/onlineldavb.tar

It's not a library, but rather an example implementation that automatically downloads wikipedia articles and runs LDA. But I've found it to be extremely helpful as a reference for implementing my own LDA code.