From 65dfaa4f4b94a2602bb5af74677d7edae6d88ff6 Mon Sep 17 00:00:00 2001 From: Adriane Boyd Date: Fri, 2 Oct 2020 08:33:43 +0200 Subject: [PATCH] Also accept MorphAnalysis in set_morph --- spacy/tokens/token.pyx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spacy/tokens/token.pyx b/spacy/tokens/token.pyx index 322c9a54c..2075c3cc8 100644 --- a/spacy/tokens/token.pyx +++ b/spacy/tokens/token.pyx @@ -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]