Fix tagger model loading

This commit is contained in:
Matthew Honnibal 2017-11-01 20:42:36 +01:00
parent 624644adfe
commit f5855e539b

View File

@ -484,6 +484,8 @@ class Tagger(Pipe):
self.vocab.strings, tag_map=tag_map,
lemmatizer=self.vocab.morphology.lemmatizer,
exc=self.vocab.morphology.exc)
for tag in self.vocab.morphology.tag_names:
self.add_label(tag)
deserialize = OrderedDict((
('vocab', lambda b: self.vocab.from_bytes(b)),
@ -519,6 +521,8 @@ class Tagger(Pipe):
self.vocab.strings, tag_map=tag_map,
lemmatizer=self.vocab.morphology.lemmatizer,
exc=self.vocab.morphology.exc)
for tag in self.vocab.morphology.tag_names:
self.add_label(tag)
deserialize = OrderedDict((
('cfg', lambda p: self.cfg.update(_load_cfg(p))),