mirror of https://github.com/explosion/spaCy.git
Use backwards-compatible super()
This commit is contained in:
parent
53da6bd672
commit
891fa59009
|
@ -7,7 +7,7 @@ def add_codes(err_cls):
|
|||
|
||||
class ErrorsWithCodes(err_cls):
|
||||
def __getattribute__(self, code):
|
||||
msg = super().__getattribute__(code)
|
||||
msg = super(ErrorsWithCodes, self).__getattribute__(code)
|
||||
if code.startswith("__"): # python system attributes like __class__
|
||||
return msg
|
||||
else:
|
||||
|
|
|
@ -13,7 +13,7 @@ class PolishLemmatizer(Lemmatizer):
|
|||
# lemmatization for nouns
|
||||
def __init__(self, lookups, *args, **kwargs):
|
||||
# this lemmatizer is lookup based, so it does not require an index, exceptionlist, or rules
|
||||
super().__init__(lookups)
|
||||
super(PolishLemmatizer, self).__init__(lookups)
|
||||
self.lemma_lookups = {}
|
||||
for tag in [
|
||||
"ADJ",
|
||||
|
|
Loading…
Reference in New Issue