From 75e1618ec32a5a06c78f5737e11aa869f60d3b20 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Mon, 6 Nov 2017 16:56:19 +0100 Subject: [PATCH] Fix lemma clobbering --- spacy/pipeline.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacy/pipeline.pyx b/spacy/pipeline.pyx index bff81a211..4f56bde67 100644 --- a/spacy/pipeline.pyx +++ b/spacy/pipeline.pyx @@ -425,7 +425,7 @@ class Tagger(Pipe): # Don't clobber preset lemmas lemma = doc.c[j].lemma 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 idx += 1 if tensors is not None: