mirror of https://github.com/explosion/spaCy.git
Fix morphology for | features
This commit is contained in:
parent
095c63c6b8
commit
188a1cf297
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue