[MRG] Updated docstrings for TfidfVectorizer functions#15509
Merged
rth merged 10 commits intoscikit-learn:masterfrom Nov 15, 2019
Merged
[MRG] Updated docstrings for TfidfVectorizer functions#15509rth merged 10 commits intoscikit-learn:masterfrom
rth merged 10 commits intoscikit-learn:masterfrom
Conversation
rth
reviewed
Nov 4, 2019
Member
rth
left a comment
There was a problem hiding this comment.
Thanks @hailey0huong ! A few comments below.
sklearn/feature_extraction/text.py
Outdated
| Returns | ||
| ------- | ||
| feature_names : list | ||
| A list of feature name. |
Member
There was a problem hiding this comment.
This line should be indented only 4 spaces more than the one above
sklearn/feature_extraction/text.py
Outdated
| ---------- | ||
| raw_documents : iterable | ||
| an iterable which yields either str, unicode or file objects | ||
| An iterable which has either str, unicode or file objects. |
Member
There was a problem hiding this comment.
Please revert "has -> yields", as an iterable does yield objects.
sklearn/feature_extraction/text.py
Outdated
| """Return a callable that handles preprocessing, tokenization | ||
|
|
||
| """ | ||
| Return a callable that handles preprocessing, tokenization |
Member
There was a problem hiding this comment.
Please revert the added line break.
It should be
"""Return ...
Contributor
Author
There was a problem hiding this comment.
Just updated the format as your suggestions. Thanks!
Co-Authored-By: Roman Yurchak <rth.yurchak@gmail.com>
Co-Authored-By: Roman Yurchak <rth.yurchak@gmail.com>
Co-Authored-By: Roman Yurchak <rth.yurchak@gmail.com>
Co-Authored-By: Roman Yurchak <rth.yurchak@gmail.com>
Co-Authored-By: Roman Yurchak <rth.yurchak@gmail.com>
Co-Authored-By: Roman Yurchak <rth.yurchak@gmail.com>
Co-Authored-By: Roman Yurchak <rth.yurchak@gmail.com>
Member
|
Thanks, merging! The Codecov failure is not relevant (only docstrings changed in this PR). |
adrinjalali
pushed a commit
to adrinjalali/scikit-learn
that referenced
this pull request
Nov 18, 2019
adrinjalali
pushed a commit
to adrinjalali/scikit-learn
that referenced
this pull request
Nov 18, 2019
adrinjalali
pushed a commit
that referenced
this pull request
Nov 19, 2019
panpiort8
pushed a commit
to panpiort8/scikit-learn
that referenced
this pull request
Mar 3, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reference Issues/PRs
Reference #15440
What does this implement/fix? Explain your changes.
Updated docstrings for TfidfVectorizer functions to pass numpydoc validation
Any other comments?
There are some methods left under this class got
TypeErrorwhile runningpython maint_tools/test_docstrings.pythat I don't know how to fix:idf_,norm,smooth_idf,sublinear_tf,use_idfThe error is below:
Traceback (most recent call last): File "maint_tools/test_docstrings.py", line 173, in <module> msg = repr_errors(res, method=args.import_path) File "maint_tools/test_docstrings.py", line 112, in repr_errors for code, message in res["errors"] TypeError: sequence item 0: expected str instance, NoneType found