mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-25 01:16:28 +03:00
Also accept MorphAnalysis in set_morph
This commit is contained in:
parent
77e08c398f
commit
65dfaa4f4b
|
@ -225,6 +225,8 @@ cdef class Token:
|
|||
cdef hash_t key
|
||||
if features is None:
|
||||
self.c.morph = 0
|
||||
elif isinstance(features, MorphAnalysis):
|
||||
self.morph = features
|
||||
else:
|
||||
if isinstance(features, int):
|
||||
features = self.vocab.strings[features]
|
||||
|
|
Loading…
Reference in New Issue
Block a user