From 11840ff5dda242b0408a6ccecf824039ef68df37 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Mon, 29 May 2017 17:53:48 -0500 Subject: [PATCH] Store tag map before normalizing props --- spacy/morphology.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacy/morphology.pyx b/spacy/morphology.pyx index 48f4f9058..50bec3115 100644 --- a/spacy/morphology.pyx +++ b/spacy/morphology.pyx @@ -44,8 +44,8 @@ cdef class Morphology: self.rich_tags = self.mem.alloc(self.n_tags, sizeof(RichTagC)) for i, (tag_str, attrs) in enumerate(sorted(tag_map.items())): - attrs = _normalize_props(attrs) self.tag_map[tag_str] = dict(attrs) + attrs = _normalize_props(attrs) attrs = intify_attrs(attrs, self.strings, _do_deprecated=True) self.rich_tags[i].id = i self.rich_tags[i].name = self.strings.add(tag_str)