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

switch experimental ngrams_func to data.utils.ngrams_iterator #813

Merged
merged 2 commits into from
Jun 8, 2020

Conversation

zhangguanheng66
Copy link
Contributor

No description provided.

@@ -50,3 +50,7 @@ def test_text_nomalize_function(self):
ref_lines.append(line)

self.assertEqual(ref_lines, test_lines)

def test_ngrams_func(self):
func = ngrams_func(2)
Copy link
Contributor

Choose a reason for hiding this comment

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

We could add more tests here

Copy link
Contributor

@cpuhrsch cpuhrsch left a comment

Choose a reason for hiding this comment

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

Let's cover one or two more cases for the ngrams iterator. If we were to move this function into C++ etc. in the future, having good test coverage now can prevent errors later on.

Copy link
Contributor

@Nayef211 Nayef211 left a comment

Choose a reason for hiding this comment

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

lgtm

@zhangguanheng66 zhangguanheng66 merged commit 035fadf into pytorch:master Jun 8, 2020
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 this pull request may close these issues.

3 participants