diff --git a/spacy/lang/en/tag_map.py b/spacy/lang/en/tag_map.py index 76eabf307..fc3d2cc93 100644 --- a/spacy/lang/en/tag_map.py +++ b/spacy/lang/en/tag_map.py @@ -42,6 +42,7 @@ TAG_MAP = { "RBR": {POS: ADV, "Degree": "comp"}, "RBS": {POS: ADV, "Degree": "sup"}, "RP": {POS: PART}, + "SP": {POS: SPACE}, "SYM": {POS: SYM}, "TO": {POS: PART, "PartType": "inf", "VerbForm": "inf"}, "UH": {POS: INTJ}, diff --git a/spacy/morphology.pyx b/spacy/morphology.pyx index 090a07fe8..91befaa1b 100644 --- a/spacy/morphology.pyx +++ b/spacy/morphology.pyx @@ -38,7 +38,7 @@ cdef class Morphology: self.strings = string_store # Add special space symbol. We prefix with underscore, to make sure it # always sorts to the end. - space_attrs = tag_map.pop('SP', {POS: SPACE}) + space_attrs = tag_map.get('SP', {POS: SPACE}) if '_SP' not in tag_map: self.strings.add('_SP') tag_map = dict(tag_map)