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

Corrected __init__ call for SyntaxCorpusReader subclasses #2872

Merged
merged 1 commit into from Nov 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 1 addition & 3 deletions nltk/corpus/reader/bracket_parse.py
Expand Up @@ -53,9 +53,7 @@ def __init__(
for normalizing or converting the POS tags returned by the
``tagged_...()`` methods.
"""
# FIXME: Why is it inheritting from SyntaxCorpusReader but initializing
# from CorpusReader?
CorpusReader.__init__(self, root, fileids, encoding)
SyntaxCorpusReader.__init__(self, root, fileids, encoding)
self._comment_char = comment_char
self._detect_blocks = detect_blocks
self._tagset = tagset
Expand Down
4 changes: 1 addition & 3 deletions nltk/corpus/reader/dependency.py
Expand Up @@ -23,9 +23,7 @@ def __init__(
sent_tokenizer=RegexpTokenizer("\n", gaps=True),
para_block_reader=read_blankline_block,
):
# FIXME: Why is it inheritting from SyntaxCorpusReader but initializing
# from CorpusReader?
CorpusReader.__init__(self, root, fileids, encoding)
SyntaxCorpusReader.__init__(self, root, fileids, encoding)

#########################################################

Expand Down
4 changes: 1 addition & 3 deletions nltk/corpus/reader/knbc.py
Expand Up @@ -58,9 +58,7 @@ def __init__(self, root, fileids, encoding="utf8", morphs2str=_morphs2str_defaul
morphs2str is a function to convert morphlist to str for tree representation
for _parse()
"""
# FIXME: Why is it inheritting from SyntaxCorpusReader but initializing
# from CorpusReader?
CorpusReader.__init__(self, root, fileids, encoding)
SyntaxCorpusReader.__init__(self, root, fileids, encoding)
self.morphs2str = morphs2str

def _read_block(self, stream):
Expand Down