mirror of
https://github.com/explosion/spaCy.git
synced 2025-02-03 13:14:11 +03:00
Avoid clobbering preset lemmas
This commit is contained in:
parent
a6ac4699eb
commit
3814a161e6
|
@ -68,7 +68,8 @@ cdef class Morphology:
|
|||
|
||||
cdef int assign_untagged(self, TokenC* token) except -1:
|
||||
'''Set morphological attributes on a token without a POS tag.'''
|
||||
token.lemma = self.lemmatize(0, token.lex.orth, {})
|
||||
if token.lemma == 0:
|
||||
token.lemma = self.lemmatize(0, token.lex.orth, {})
|
||||
|
||||
cdef int assign_tag(self, TokenC* token, tag) except -1:
|
||||
if isinstance(tag, basestring):
|
||||
|
|
Loading…
Reference in New Issue
Block a user