diff --git a/CHANGELOG.md b/CHANGELOG.md index 3780bee035..2df3c2f8bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ Changes ## Unreleased - LsiModel: Only log top words that actually exist in the dictionary (PR [#3091](https://github.com/RaRe-Technologies/gensim/pull/3091), [@kmurphy4](https://github.com/kmurphy4)) +- Materialize and copy the corpus passed to SoftCosineSimilarity (PR [#3128](https://github.com/RaRe-Technologies/gensim/pull/3128), [@Witiko](https://github.com/Witiko)) - [#3115](https://github.com/RaRe-Technologies/gensim/pull/3115): Make LSI dispatcher CLI param for number of jobs optional, by [@robguinness](https://github.com/robguinness)) ### Documentation diff --git a/gensim/similarities/docsim.py b/gensim/similarities/docsim.py index 4dd0528f50..d9d1ca31d9 100755 --- a/gensim/similarities/docsim.py +++ b/gensim/similarities/docsim.py @@ -937,7 +937,7 @@ def __init__(self, corpus, similarity_matrix, num_best=None, chunksize=256, norm """ self.similarity_matrix = similarity_matrix - self.corpus = corpus + self.corpus = list(corpus) self.num_best = num_best self.chunksize = chunksize self.normalized = normalized