fix tagger begin_training being called without examples

This commit is contained in:
svlandeg 2020-06-20 22:38:00 +02:00
parent 5cb812e0ab
commit 256d4c27c8
1 changed files with 2 additions and 3 deletions

View File

@ -394,12 +394,11 @@ class Tagger(Pipe):
new_tag_map[tag] = orig_tag_map[tag]
else:
new_tag_map[tag] = {POS: X}
# TODO: do we still need this?
if "_SP" in orig_tag_map:
new_tag_map["_SP"] = orig_tag_map["_SP"]
cdef Vocab vocab = self.vocab
if new_tag_map:
if "_SP" in orig_tag_map:
new_tag_map["_SP"] = orig_tag_map["_SP"]
vocab.morphology = Morphology(vocab.strings, new_tag_map,
vocab.morphology.lemmatizer,
exc=vocab.morphology.exc)