diff --git a/hub_module/modules/text/semantic_model/lda_news/README.md b/hub_module/modules/text/semantic_model/lda_news/README.md index 9e3078d676515ecc2e57cc833023cf8b1451471a..c811bb0fe96d199e9044a18e56e6b57e19a8b975 100644 --- a/hub_module/modules/text/semantic_model/lda_news/README.md +++ b/hub_module/modules/text/semantic_model/lda_news/README.md @@ -137,3 +137,7 @@ paddlehub >= 1.8.0 * 1.0.0 初始发布 + +* 1.0.1 + + 修复因为return的bug导致的NoneType错误 diff --git a/hub_module/modules/text/semantic_model/lda_news/document.py b/hub_module/modules/text/semantic_model/lda_news/document.py index d9a5426f26652aadb368877e1ebb1ffb0bd821c7..b79acd0794f60fb0a401726aea0b8b51deda90a1 100644 --- a/hub_module/modules/text/semantic_model/lda_news/document.py +++ b/hub_module/modules/text/semantic_model/lda_news/document.py @@ -97,7 +97,7 @@ class LDADoc(object): topic_dist = [] sum_ = np.sum(self._accum_topic_sum) if sum_ == 0: - return + return topic_dist for i in range(0, self._num_topics): if self._accum_topic_sum[i] == 0: continue diff --git a/hub_module/modules/text/semantic_model/lda_news/module.py b/hub_module/modules/text/semantic_model/lda_news/module.py index 0bde84fae1091d4effb5f6ba7b1b207a72a40aa4..f95f611d855d3f9fe8bd52417f8194affa7ca165 100644 --- a/hub_module/modules/text/semantic_model/lda_news/module.py +++ b/hub_module/modules/text/semantic_model/lda_news/module.py @@ -14,7 +14,7 @@ from lda_news.vocab import Vocab, WordCount @moduleinfo( name="lda_news", - version="1.0.0", + version="1.0.1", summary= "This is a PaddleHub Module for LDA topic model in news dataset, where we can calculate doc distance, calculate the similarity between query and document, etc", author="DesmonDay", diff --git a/hub_module/modules/text/semantic_model/lda_novel/README.md b/hub_module/modules/text/semantic_model/lda_novel/README.md index 5f33059452a2e3fbd8f970410e867afe8c6d20c6..98046495f361c9c24eba136f920e8a064777b620 100644 --- a/hub_module/modules/text/semantic_model/lda_novel/README.md +++ b/hub_module/modules/text/semantic_model/lda_novel/README.md @@ -137,3 +137,7 @@ paddlehub >= 1.8.0 * 1.0.0 初始发布 + +* 1.0.1 + + 修复因为return的bug导致的NoneType错误 diff --git a/hub_module/modules/text/semantic_model/lda_novel/document.py b/hub_module/modules/text/semantic_model/lda_novel/document.py index d9a5426f26652aadb368877e1ebb1ffb0bd821c7..b79acd0794f60fb0a401726aea0b8b51deda90a1 100644 --- a/hub_module/modules/text/semantic_model/lda_novel/document.py +++ b/hub_module/modules/text/semantic_model/lda_novel/document.py @@ -97,7 +97,7 @@ class LDADoc(object): topic_dist = [] sum_ = np.sum(self._accum_topic_sum) if sum_ == 0: - return + return topic_dist for i in range(0, self._num_topics): if self._accum_topic_sum[i] == 0: continue diff --git a/hub_module/modules/text/semantic_model/lda_novel/module.py b/hub_module/modules/text/semantic_model/lda_novel/module.py index 237b03366ca9dc3645fd9be4ed018adecfad9514..b8f000ee45038d279812fbf064ff7875ea12d881 100644 --- a/hub_module/modules/text/semantic_model/lda_novel/module.py +++ b/hub_module/modules/text/semantic_model/lda_novel/module.py @@ -14,7 +14,7 @@ from lda_novel.vocab import Vocab, WordCount @moduleinfo( name="lda_novel", - version="1.0.0", + version="1.0.1", summary= "This is a PaddleHub Module for LDA topic model in novel dataset, where we can calculate doc distance, calculate the similarity between query and document, etc.", author="DesmonDay", diff --git a/hub_module/modules/text/semantic_model/lda_webpage/README.md b/hub_module/modules/text/semantic_model/lda_webpage/README.md index a859876de56a24e59a37dc72de31c02dda49606c..872485d8b0d7394317f7cc7e0d14d4fd8858fabe 100644 --- a/hub_module/modules/text/semantic_model/lda_webpage/README.md +++ b/hub_module/modules/text/semantic_model/lda_webpage/README.md @@ -133,3 +133,7 @@ paddlehub >= 1.8.0 * 1.0.0 初始发布 + +* 1.0.1 + + 修复因为return的bug导致的NoneType错误 diff --git a/hub_module/modules/text/semantic_model/lda_webpage/document.py b/hub_module/modules/text/semantic_model/lda_webpage/document.py index d9a5426f26652aadb368877e1ebb1ffb0bd821c7..b79acd0794f60fb0a401726aea0b8b51deda90a1 100644 --- a/hub_module/modules/text/semantic_model/lda_webpage/document.py +++ b/hub_module/modules/text/semantic_model/lda_webpage/document.py @@ -97,7 +97,7 @@ class LDADoc(object): topic_dist = [] sum_ = np.sum(self._accum_topic_sum) if sum_ == 0: - return + return topic_dist for i in range(0, self._num_topics): if self._accum_topic_sum[i] == 0: continue diff --git a/hub_module/modules/text/semantic_model/lda_webpage/module.py b/hub_module/modules/text/semantic_model/lda_webpage/module.py index 7b35cd90586cd13eccb73772e72efd9d4adc8a33..a1aa4d545f45874737e09ef0ef3d699e6addb1a6 100644 --- a/hub_module/modules/text/semantic_model/lda_webpage/module.py +++ b/hub_module/modules/text/semantic_model/lda_webpage/module.py @@ -14,7 +14,7 @@ from lda_webpage.vocab import Vocab, WordCount @moduleinfo( name="lda_webpage", - version="1.0.0", + version="1.0.1", summary= "This is a PaddleHub Module for LDA topic model in webpage dataset, where we can calculate doc distance, calculate the similarity between query and document, etc.", author="DesmonDay", diff --git a/hub_module/modules/text/semantic_model/slda_news/document.py b/hub_module/modules/text/semantic_model/slda_news/document.py index d9a5426f26652aadb368877e1ebb1ffb0bd821c7..b79acd0794f60fb0a401726aea0b8b51deda90a1 100644 --- a/hub_module/modules/text/semantic_model/slda_news/document.py +++ b/hub_module/modules/text/semantic_model/slda_news/document.py @@ -97,7 +97,7 @@ class LDADoc(object): topic_dist = [] sum_ = np.sum(self._accum_topic_sum) if sum_ == 0: - return + return topic_dist for i in range(0, self._num_topics): if self._accum_topic_sum[i] == 0: continue diff --git a/hub_module/modules/text/semantic_model/slda_novel/document.py b/hub_module/modules/text/semantic_model/slda_novel/document.py index d9a5426f26652aadb368877e1ebb1ffb0bd821c7..b79acd0794f60fb0a401726aea0b8b51deda90a1 100644 --- a/hub_module/modules/text/semantic_model/slda_novel/document.py +++ b/hub_module/modules/text/semantic_model/slda_novel/document.py @@ -97,7 +97,7 @@ class LDADoc(object): topic_dist = [] sum_ = np.sum(self._accum_topic_sum) if sum_ == 0: - return + return topic_dist for i in range(0, self._num_topics): if self._accum_topic_sum[i] == 0: continue diff --git a/hub_module/modules/text/semantic_model/slda_webpage/document.py b/hub_module/modules/text/semantic_model/slda_webpage/document.py index d9a5426f26652aadb368877e1ebb1ffb0bd821c7..b79acd0794f60fb0a401726aea0b8b51deda90a1 100644 --- a/hub_module/modules/text/semantic_model/slda_webpage/document.py +++ b/hub_module/modules/text/semantic_model/slda_webpage/document.py @@ -97,7 +97,7 @@ class LDADoc(object): topic_dist = [] sum_ = np.sum(self._accum_topic_sum) if sum_ == 0: - return + return topic_dist for i in range(0, self._num_topics): if self._accum_topic_sum[i] == 0: continue diff --git a/hub_module/modules/text/semantic_model/slda_weibo/document.py b/hub_module/modules/text/semantic_model/slda_weibo/document.py index d9a5426f26652aadb368877e1ebb1ffb0bd821c7..b79acd0794f60fb0a401726aea0b8b51deda90a1 100644 --- a/hub_module/modules/text/semantic_model/slda_weibo/document.py +++ b/hub_module/modules/text/semantic_model/slda_weibo/document.py @@ -97,7 +97,7 @@ class LDADoc(object): topic_dist = [] sum_ = np.sum(self._accum_topic_sum) if sum_ == 0: - return + return topic_dist for i in range(0, self._num_topics): if self._accum_topic_sum[i] == 0: continue