Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Potential bug in BM25 implementation #54

Open
IvanStelmakh opened this issue Mar 1, 2021 · 1 comment
Open

Potential bug in BM25 implementation #54

IvanStelmakh opened this issue Mar 1, 2021 · 1 comment
Assignees

Comments

@IvanStelmakh
Copy link

When BM25 is executed with both use_abstract and use_title are set as true, a division by zero error occurs in line 47 of https://github.com/openreview/openreview-expertise/blob/master/expertise/models/bm25/bm25.py

This is because in lines 33-42 of the same file self.title_corpus list is not updated when use_abstract is set to true, irrespective of whether use_title is set to true or false.

Thus, if both use_abstract and use_title are set to true, in line 47 we have an empty list in the self.title_corpus which results into an error.

@carlosmondra
Copy link
Member

Thanks! I will look into this

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

No branches or pull requests

3 participants