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

Fix get_scores_dict for duplicate tokens #192

Merged
merged 2 commits into from
Jun 19, 2023
Merged

Fix get_scores_dict for duplicate tokens #192

merged 2 commits into from
Jun 19, 2023

Conversation

gsarti
Copy link
Member

@gsarti gsarti commented Jun 16, 2023

Description

At the moment the presence of duplicate tokens in either the source or the target sentence produces a malformed dictionary when out.get_scores_dict is called due to the unicity requirement of dict keys. This PR fixes the issue by using tuples of token_idx, token as keys for the different dictionary field.

  • 💥 Breaking change (fix or feature that would cause existing functionality to change)

@gsarti gsarti merged commit ed5a4c2 into main Jun 19, 2023
@gsarti gsarti deleted the fix-scores-dicts branch June 19, 2023 08:21
@gsarti gsarti added the bug Something isn't working label Jun 19, 2023
@gsarti gsarti added this to the v0.5 milestone Jun 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant