python - infer topic distributions on new, unseen documents with LDA and Gensim -


suppose have generated latent dirichlet allocation model of corpus1 using basic command:

ldamodel = gensim.models.ldamodel.ldamodel(corpus1, num_topics=25, id2word = dictionary, passes=50, minimum_probability=0) 

my question be, how can classify new documents `corpus2'?

i trying use following command print(ldamodel[corpus2[1]]) obtain distribution first document following error:

valueerror: not enough values unpack (expected 2, got 1) 

i confused regarding class object corpus2 should be. suggestions of find more information or tutorial more welcome


Comments

Popular posts from this blog

service - Android MediaPlayer calls onCompletion before it already finished -

javascript - Training Neural Network to play flappy bird with genetic algorithm - Why can't it learn? -

javascript - Create a stacked percentage column -