-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
308 random sample on stream #1408
Conversation
Test for this method are a bit cluncy.
gensim/test/test_wikicorpus.py
Outdated
@@ -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)) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
gensim/test/test_wikicorpus.py
Outdated
wc = WikiCorpus(datapath(FILENAME_U), processes=1) | ||
print(len(wc)) | ||
for x in wc.sample_texts(1): | ||
print(x) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Thank you @vlejd, сongratulations on your first PR 🥇 |
#308