mirror of
https://github.com/explosion/spaCy.git
synced 2024-11-11 04:08:09 +03:00
Fix lemma clobbering
This commit is contained in:
parent
6fdffd7246
commit
75e1618ec3
|
@ -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:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user