mirror of
https://github.com/explosion/spaCy.git
synced 2025-06-11 00:23:07 +03:00
Fix tagger model loading
This commit is contained in:
parent
624644adfe
commit
f5855e539b
|
@ -484,6 +484,8 @@ class Tagger(Pipe):
|
||||||
self.vocab.strings, tag_map=tag_map,
|
self.vocab.strings, tag_map=tag_map,
|
||||||
lemmatizer=self.vocab.morphology.lemmatizer,
|
lemmatizer=self.vocab.morphology.lemmatizer,
|
||||||
exc=self.vocab.morphology.exc)
|
exc=self.vocab.morphology.exc)
|
||||||
|
for tag in self.vocab.morphology.tag_names:
|
||||||
|
self.add_label(tag)
|
||||||
|
|
||||||
deserialize = OrderedDict((
|
deserialize = OrderedDict((
|
||||||
('vocab', lambda b: self.vocab.from_bytes(b)),
|
('vocab', lambda b: self.vocab.from_bytes(b)),
|
||||||
|
@ -519,6 +521,8 @@ class Tagger(Pipe):
|
||||||
self.vocab.strings, tag_map=tag_map,
|
self.vocab.strings, tag_map=tag_map,
|
||||||
lemmatizer=self.vocab.morphology.lemmatizer,
|
lemmatizer=self.vocab.morphology.lemmatizer,
|
||||||
exc=self.vocab.morphology.exc)
|
exc=self.vocab.morphology.exc)
|
||||||
|
for tag in self.vocab.morphology.tag_names:
|
||||||
|
self.add_label(tag)
|
||||||
|
|
||||||
deserialize = OrderedDict((
|
deserialize = OrderedDict((
|
||||||
('cfg', lambda p: self.cfg.update(_load_cfg(p))),
|
('cfg', lambda p: self.cfg.update(_load_cfg(p))),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user