From 3980f1b0cb62f21108a9b0d5f935009d49944f42 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Sun, 18 Dec 2016 17:33:46 +0100 Subject: [PATCH] Ignore more morphology attributes in deprecated mode of intify_attrs --- spacy/attrs.pyx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/spacy/attrs.pyx b/spacy/attrs.pyx index ddcbdff64..81554ecd3 100644 --- a/spacy/attrs.pyx +++ b/spacy/attrs.pyx @@ -124,10 +124,15 @@ def intify_attrs(stringy_attrs, strings_map=None, _do_deprecated=False): 'PunctType', 'PunctSide', 'Other', 'Degree', 'AdvType', 'Number', 'VerbForm', 'PronType', 'Aspect', 'Tense', 'PartType', 'Poss', 'Hyph', 'ConjType', 'NumType', 'Foreign', 'VerbType', 'NounType', - 'Number', 'PronType', 'AdjType', 'Person'] + 'Number', 'PronType', 'AdjType', 'Person', 'Variant', 'AdpType', + 'Reflex', 'Negative', 'Mood', 'Aspect', 'Case'] for key in morph_keys: if key in stringy_attrs: stringy_attrs.pop(key) + elif key.lower() in stringy_attrs: + stringy_attrs.pop(key.lower()) + elif key.upper() in stringy_attrs: + stringy_attrs.pop(key.upper()) for name, value in stringy_attrs.items(): if isinstance(name, int): int_key = name