Merge pull request #5527 from adrianeboyd/bugfix/tagger-sp-tag-map

Preserve _SP when filtering tag map in Tagger
This commit is contained in:
Matthew Honnibal 2020-06-01 12:00:21 +02:00 committed by GitHub
commit 67af3a32b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -526,6 +526,8 @@ class Tagger(Pipe):
new_tag_map[tag] = orig_tag_map[tag]
else:
new_tag_map[tag] = {POS: X}
if "_SP" in orig_tag_map:
new_tag_map["_SP"] = orig_tag_map["_SP"]
cdef Vocab vocab = self.vocab
if new_tag_map:
vocab.morphology = Morphology(vocab.strings, new_tag_map,