Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Bug report of gensim official webpage #2985

Closed
yftadyz opened this issue Oct 19, 2020 · 1 comment
Closed

Bug report of gensim official webpage #2985

yftadyz opened this issue Oct 19, 2020 · 1 comment

Comments

@yftadyz
Copy link

yftadyz commented Oct 19, 2020

https://radimrehurek.com/gensim/auto_examples/core/run_similarity_queries.html#sphx-glr-auto-examples-core-run-similarity-queries-py

In this page, at the last second code part, the original code is :
sims = sorted(enumerate(sims), key=lambda item: -item[1])
for i, s in enumerate(sims):
print(s, documents[i])

However, I guess here code should be:
sims = sorted(enumerate(sims), key=lambda item: -item[1])
for i, s in enumerate(sims):
print(s, documents[s[0]])

@piskvorky
Copy link
Owner

Thanks for reporting! Duplicate of #2699, already fixed.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants