Skip to content

Commit

Permalink
Materialize and copy the corpus passed to SoftCosineSimilarity (#3128)
Browse files Browse the repository at this point in the history
* Materialize and copy the corpus passed to SoftCosineSimilarity

* Update CHANGELOG.md

Co-authored-by: Michael Penkov <[email protected]>
  • Loading branch information
Witiko and mpenkov authored May 5, 2021
1 parent 91f1fc4 commit 1be4674
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion gensim/similarities/docsim.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1be4674

Please sign in to comment.