Skip to content

Commit

Permalink
Add parameters toper_word_topics for a corpus piskvorky#908
Browse files Browse the repository at this point in the history
  • Loading branch information
SND96 committed Oct 6, 2016
1 parent af7434f commit d033828
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gensim/models/ldamodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -921,7 +921,7 @@ def get_document_topics(self, bow, minimum_probability=None, minimum_phi_value=N
# if the input vector is a corpus, return a transformed corpus
is_corpus, corpus = utils.is_corpus(bow)
if is_corpus:
return self._apply(corpus)
return self._apply(corpus, per_word_topics =True)

gamma, phis = self.inference([bow], collect_sstats=True)
topic_dist = gamma[0] / sum(gamma[0]) # normalize distribution
Expand Down

0 comments on commit d033828

Please sign in to comment.