Fix lemma clobbering

This commit is contained in:
Matthew Honnibal 2017-11-06 16:56:19 +01:00
parent 6fdffd7246
commit 75e1618ec3
1 changed files with 1 additions and 1 deletions

View File

@ -425,7 +425,7 @@ class Tagger(Pipe):
# Don't clobber preset lemmas # Don't clobber preset lemmas
lemma = doc.c[j].lemma lemma = doc.c[j].lemma
vocab.morphology.assign_tag_id(&doc.c[j], tag_id) vocab.morphology.assign_tag_id(&doc.c[j], tag_id)
if lemma != 0: if lemma != 0 and lemma != doc.c[j].lex.orth:
doc.c[j].lemma = lemma doc.c[j].lemma = lemma
idx += 1 idx += 1
if tensors is not None: if tensors is not None: