Restore SP tag to English tag_map, until models migrate

This commit is contained in:
Matthew Honnibal 2017-10-24 17:04:43 +02:00
parent 30e67fa808
commit 66766c1454
2 changed files with 2 additions and 1 deletions

View File

@ -42,6 +42,7 @@ TAG_MAP = {
"RBR": {POS: ADV, "Degree": "comp"}, "RBR": {POS: ADV, "Degree": "comp"},
"RBS": {POS: ADV, "Degree": "sup"}, "RBS": {POS: ADV, "Degree": "sup"},
"RP": {POS: PART}, "RP": {POS: PART},
"SP": {POS: SPACE},
"SYM": {POS: SYM}, "SYM": {POS: SYM},
"TO": {POS: PART, "PartType": "inf", "VerbForm": "inf"}, "TO": {POS: PART, "PartType": "inf", "VerbForm": "inf"},
"UH": {POS: INTJ}, "UH": {POS: INTJ},

View File

@ -38,7 +38,7 @@ cdef class Morphology:
self.strings = string_store self.strings = string_store
# Add special space symbol. We prefix with underscore, to make sure it # Add special space symbol. We prefix with underscore, to make sure it
# always sorts to the end. # 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: if '_SP' not in tag_map:
self.strings.add('_SP') self.strings.add('_SP')
tag_map = dict(tag_map) tag_map = dict(tag_map)