Set pos attribute in morphologizer

This commit is contained in:
Matthew Honnibal 2019-03-09 11:51:11 +00:00
parent a6d153b0a0
commit f742900f83

View File

@ -94,6 +94,8 @@ class Morphologizer(Pipe):
# Now add the analysis, and set the hash.
try:
doc.c[j].morph = self.vocab.morphology.add(feats)
if doc[j].morph.pos != 0:
doc.c[j].pos = doc[j].morph.pos
except:
print(offsets)
print(doc_guesses[j])