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

308 random sample on stream #1408

Merged
merged 3 commits into from
Jun 15, 2017

Conversation

vlejd
Copy link
Contributor

@vlejd vlejd commented Jun 10, 2017

@@ -62,6 +63,13 @@ def test_unicode_element(self):
l = wc.get_texts()
self.assertTrue(u'папа' in next(l))

def test_sample_text(self):
wc = WikiCorpus(datapath(FILENAME_U), processes=1)
print(len(wc))
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we need this line?

Copy link
Contributor Author

@vlejd vlejd Jun 14, 2017

Choose a reason for hiding this comment

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

This whole function should not be here. I remove it.

wc = WikiCorpus(datapath(FILENAME_U), processes=1)
print(len(wc))
for x in wc.sample_texts(1):
print(x)
Copy link
Contributor

Choose a reason for hiding this comment

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

No needed to print result in tests. You can use pass instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This whole function should not be here. I remove it.

I forgot to remove test which is done in test_textcorpus.py from
test_wikicorpus.py.
@menshikh-iv
Copy link
Contributor

Thank you @vlejd, сongratulations on your first PR 🥇

@menshikh-iv menshikh-iv merged commit f62ae5f into piskvorky:develop Jun 15, 2017
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.

2 participants