title: Get topic probability distribution for new document
body: <p>I have a working topic model called <code>model</code>, with the following settings:</p>
  <pre><code>model = LdaModel(corpus=corpus,
                               id2word=id2word,
                               num_topics=10, 
                               random_state=100,
                               update_every=1,
                               chunksize=100,
                               passes=50,
                               alpha='auto',
                               per_word_topics=True)
  </code></pre>
  <p>This model is trained on <code>data_words</code>, a list with lists with a string of text in each list, such as:</p>
  <pre><code>data_words = [['This is the first text'],['This is another text'], ['Here is the very last text']]
  </code></pre>
  <p>In this case, <code>len(data_words)</code> is three, but with my actual data it's (around) 4000.</p>
  <p>Based on the trained topic model, I would like to represent each of my 4000 documents from <code>data_words</code> as a topic probability distribution. For each document, this would be a num_topics-dimensional vector with each cell representing the probability that a topic is represented in that document.</p>
  <p>Following the <a href="https://radimrehurek.com/gensim/models/ldamodel.html" rel="nofollow noreferrer">documentation</a>, I have taken the following steps:</p>
  <pre><code>from gensim.corpora.dictionary import Dictionary
  common_dictionary = Dictionary(data_words)
  common_corpus = [common_dictionary.doc2bow(text) for text in data_words]
  </code></pre>
  <p>And to get the distribution, I ran:
  <code>model[common_corpus[0]]</code></p>
  <p>The output here is a tuple. Of which the first element <code>model[common_corpus[0]][0]</code> looks as follows:</p>
  <pre><code>[(0, 0.26094702),
   (1, 0.29876992),
   (3, 0.3244001),
   (7, 0.045543537),
   (8, 0.03196496),
   (9, 0.031232798)]
  </code></pre>
  <p>Is it correct that this is the topic distribution for the first document and that the probabilities of topic 2,4,5 and 6 are equal to zero? Or should I interpret this differently?</p>
  <p>Ultimately, I would like to have a 4000xnum_topics matrix in which each cell represents the probability of a topic in a document. Assuming <code>model[common_corpus[0]][0]</code> is what I suspect it is, I could write a function to obtain that matrix from <code>model[common_corpus[0]][i]</code> for each document <code>i</code>. Are there quicker ways to obtain this matrix though?</p>