Add comment

This commit is contained in:
Matthew Honnibal 2019-03-07 12:14:37 +01:00
parent be5235369c
commit 6734cfec88

View File

@ -204,6 +204,7 @@ cdef class Morphology:
pos = 0 pos = 0
cdef attr_t lemma = <attr_t>self._cache.get(tag_id, token.lex.orth) cdef attr_t lemma = <attr_t>self._cache.get(tag_id, token.lex.orth)
if lemma == 0: if lemma == 0:
# Ugh, self.lemmatize has opposite arg order from self.lemmatizer :(
lemma = self.lemmatize(pos, token.lex.orth, features) lemma = self.lemmatize(pos, token.lex.orth, features)
self._cache.set(tag_id, token.lex.orth, <void*>lemma) self._cache.set(tag_id, token.lex.orth, <void*>lemma)
token.lemma = lemma token.lemma = lemma