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):
|
class ErrorsWithCodes(err_cls):
|
||||||
def __getattribute__(self, code):
|
def __getattribute__(self, code):
|
||||||
msg = super().__getattribute__(code)
|
msg = super(ErrorsWithCodes, self).__getattribute__(code)
|
||||||
if code.startswith("__"): # python system attributes like __class__
|
if code.startswith("__"): # python system attributes like __class__
|
||||||
return msg
|
return msg
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -13,7 +13,7 @@ class PolishLemmatizer(Lemmatizer):
|
||||||
# lemmatization for nouns
|
# lemmatization for nouns
|
||||||
def __init__(self, lookups, *args, **kwargs):
|
def __init__(self, lookups, *args, **kwargs):
|
||||||
# this lemmatizer is lookup based, so it does not require an index, exceptionlist, or rules
|
# 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 = {}
|
self.lemma_lookups = {}
|
||||||
for tag in [
|
for tag in [
|
||||||
"ADJ",
|
"ADJ",
|
||||||
|
|
Loading…
Reference in New Issue