mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-13 18:56:36 +03:00
Avoid clobbering preset lemmas
This commit is contained in:
parent
6f438b17c1
commit
bb25cb0f76
|
@ -109,7 +109,8 @@ cdef class Morphology:
|
|||
analysis.lemma = self.lemmatize(analysis.tag.pos, token.lex.orth,
|
||||
self.tag_map.get(tag_str, {}))
|
||||
self._cache.set(tag_id, token.lex.orth, analysis)
|
||||
token.lemma = analysis.lemma
|
||||
if token.lemma == 0:
|
||||
token.lemma = analysis.lemma
|
||||
token.pos = analysis.tag.pos
|
||||
token.tag = analysis.tag.name
|
||||
token.morph = analysis.tag.morph
|
||||
|
|
Loading…
Reference in New Issue
Block a user