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

Bug in _invert_pid_docid_map #178

Closed
xhw1 opened this issue Mar 21, 2024 · 1 comment · Fixed by #179
Closed

Bug in _invert_pid_docid_map #178

xhw1 opened this issue Mar 21, 2024 · 1 comment · Fixed by #179

Comments

@xhw1
Copy link

xhw1 commented Mar 21, 2024

Should probably be:

def _invert_pid_docid_map(self) -> Dict[str, List[int]]:
    d = defaultdict(list)
    for k, v in self.pid_docid_map.items():
        d[v].append(k)
    return d
@bclavie
Copy link
Collaborator

bclavie commented Mar 21, 2024

You're completely correct, the doc_id --> pid relationship should be one-to-many, not one-to-one. Thanks for flagging, implementing in #179 and will release as a minor fix version (0.0.8post2)

@bclavie bclavie closed this as completed Mar 21, 2024
@bclavie bclavie linked a pull request Mar 21, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants