From 188a1cf297860197dc0253165d0969c7520acf66 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Sun, 25 Aug 2019 21:57:02 +0200 Subject: [PATCH] Fix morphology for | features --- spacy/morphology.pyx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/spacy/morphology.pyx b/spacy/morphology.pyx index 2fd81bf8e..ccfb214bc 100644 --- a/spacy/morphology.pyx +++ b/spacy/morphology.pyx @@ -71,6 +71,10 @@ def _normalize_props(props): for key in FIELDS: if key in props: value = str(props[key]).lower() + # We don't have support for disjunctive int|rel features, so + # just take the first one :( + if "|" in value: + value = value.split("|")[0] attr = '%s_%s' % (key, value) if attr in FEATURES: props.pop(key)