Skip to content
This repository was archived by the owner on Sep 10, 2025. It is now read-only.

Conversation

@Asugawara
Copy link
Contributor

In advance, thank you for this cool OSS!

There is a TODO comment in torchtext/data/metrics.py.
So, I made some changes based on the comment.
Would you be able to check them?


for ngram in candidate_counter: # TODO: no need to loop through the whole counter
total_counts[len(ngram) - 1] += candidate_counter[ngram]
for i in range(max_n):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a one-line comment explaining the change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your review! Sure!

Copy link
Member

@joecummings joecummings left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good, thanks for working on this. Just one nit

@joecummings joecummings self-requested a review September 27, 2022 15:40
Copy link
Member

@joecummings joecummings left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants