Skip to content

Commit 08d1cf8

Browse files
committed
Merge branch 'develop' of https://github.com/explosion/spaCy into develop
2 parents e61a067 + 46e62ad commit 08d1cf8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

spacy/morphology.pyx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,8 @@ cdef class Morphology:
109109
analysis.lemma = self.lemmatize(analysis.tag.pos, token.lex.orth,
110110
self.tag_map.get(tag_str, {}))
111111
self._cache.set(tag_id, token.lex.orth, analysis)
112-
token.lemma = analysis.lemma
112+
if token.lemma == 0:
113+
token.lemma = analysis.lemma
113114
token.pos = analysis.tag.pos
114115
token.tag = analysis.tag.name
115116
token.morph = analysis.tag.morph

0 commit comments

Comments
 (0)