mirror of
https://github.com/explosion/spaCy.git
synced 2025-07-22 22:20:08 +03:00
Set pos attribute in morphologizer
This commit is contained in:
parent
a6d153b0a0
commit
f742900f83
|
@ -94,6 +94,8 @@ class Morphologizer(Pipe):
|
||||||
# Now add the analysis, and set the hash.
|
# Now add the analysis, and set the hash.
|
||||||
try:
|
try:
|
||||||
doc.c[j].morph = self.vocab.morphology.add(feats)
|
doc.c[j].morph = self.vocab.morphology.add(feats)
|
||||||
|
if doc[j].morph.pos != 0:
|
||||||
|
doc.c[j].pos = doc[j].morph.pos
|
||||||
except:
|
except:
|
||||||
print(offsets)
|
print(offsets)
|
||||||
print(doc_guesses[j])
|
print(doc_guesses[j])
|
||||||
|
|
Loading…
Reference in New Issue
Block a user