From 132aef5dc1db81f2794de556655b96cf4991b403 Mon Sep 17 00:00:00 2001 From: Saksham Suri Date: Wed, 12 Oct 2016 22:29:43 +0530 Subject: [PATCH 1/4] Updated ldamodel.py --- gensim/models/ldamodel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gensim/models/ldamodel.py b/gensim/models/ldamodel.py index b985b2f628..211b787037 100755 --- a/gensim/models/ldamodel.py +++ b/gensim/models/ldamodel.py @@ -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_topic=True ) gamma, phis = self.inference([bow], collect_sstats=True) topic_dist = gamma[0] / sum(gamma[0]) # normalize distribution From c6da1acefc4bbb32337e15840af842e4de904701 Mon Sep 17 00:00:00 2001 From: Saksham Suri Date: Wed, 12 Oct 2016 22:40:21 +0530 Subject: [PATCH 2/4] Update CHANGELOG.md --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c950c618fd..24b2f0f5fb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ Changes ======= +0.13.4, 2016-10-12 + +* Fixed issue in ldamodel.py by adding a parameter per_word_topics to apply call (@saksham15082, #908) + 0.13.3, 2016-09-26 From bd129d0bb83f9f7ca67fd35597b2a86c9e9856db Mon Sep 17 00:00:00 2001 From: Saksham Suri Date: Wed, 12 Oct 2016 22:42:50 +0530 Subject: [PATCH 3/4] Added parameter per_word_topics to apply call --- gensim/models/ldamodel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gensim/models/ldamodel.py b/gensim/models/ldamodel.py index 211b787037..17d5064320 100755 --- a/gensim/models/ldamodel.py +++ b/gensim/models/ldamodel.py @@ -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 , per_word_topic=True ) + 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 From c1b604acdaad477ed80403e39515063927ff7b6f Mon Sep 17 00:00:00 2001 From: Saksham Suri Date: Thu, 13 Oct 2016 19:33:41 +0530 Subject: [PATCH 4/4] Update ldamodel.py --- gensim/models/ldamodel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gensim/models/ldamodel.py b/gensim/models/ldamodel.py index 17d5064320..ce5e98e2b8 100755 --- a/gensim/models/ldamodel.py +++ b/gensim/models/ldamodel.py @@ -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 , per_word_topics=True ) + return self._apply(corpus , per_word_topics) gamma, phis = self.inference([bow], collect_sstats=True) topic_dist = gamma[0] / sum(gamma[0]) # normalize distribution