mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-13 02:36:32 +03:00
Filter out morphology keys in deprecated attrs
This commit is contained in:
parent
837a5d4100
commit
d58187ffa7
|
@ -120,8 +120,14 @@ def intify_attrs(stringy_attrs, strings_map=None, _do_deprecated=False):
|
||||||
stringy_attrs.pop('number')
|
stringy_attrs.pop('number')
|
||||||
if 'tenspect' in stringy_attrs:
|
if 'tenspect' in stringy_attrs:
|
||||||
stringy_attrs.pop('tenspect')
|
stringy_attrs.pop('tenspect')
|
||||||
# for name, value in morphs.items():
|
morph_keys = [
|
||||||
# stringy_attrs[name] = value
|
'PunctType', 'PunctSide', 'Other', 'Degree', 'AdvType', 'Number',
|
||||||
|
'VerbForm', 'PronType', 'Aspect', 'Tense', 'PartType', 'Poss',
|
||||||
|
'Hyph', 'ConjType', 'NumType', 'Foreign', 'VerbType', 'NounType',
|
||||||
|
'Number', 'PronType', 'AdjType', 'Person']
|
||||||
|
for key in morph_keys:
|
||||||
|
if key in stringy_attrs:
|
||||||
|
stringy_attrs.pop(key)
|
||||||
for name, value in stringy_attrs.items():
|
for name, value in stringy_attrs.items():
|
||||||
if isinstance(name, int):
|
if isinstance(name, int):
|
||||||
int_key = name
|
int_key = name
|
||||||
|
|
Loading…
Reference in New Issue
Block a user