From 16122f566ea18eb87880e51f6a119d9f28401fdc Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Sun, 17 Sep 2017 12:28:53 -0500 Subject: [PATCH] Fix cpdef enum in attrs.pyx --- spacy/attrs.pxd | 2 +- spacy/attrs.pyx | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/spacy/attrs.pxd b/spacy/attrs.pxd index a8ee9cac0..74397fa64 100644 --- a/spacy/attrs.pxd +++ b/spacy/attrs.pxd @@ -1,5 +1,5 @@ # Reserve 64 values for flag features -cpdef enum attr_id_t: +cdef enum attr_id_t: NULL_ATTR IS_ALPHA IS_ASCII diff --git a/spacy/attrs.pyx b/spacy/attrs.pyx index ba95e1e72..8efd9e189 100644 --- a/spacy/attrs.pyx +++ b/spacy/attrs.pyx @@ -94,6 +94,7 @@ IDS = { # ATTR IDs, in order of the symbol NAMES = [key for key, value in sorted(IDS.items(), key=lambda item: item[1])] +locals().update(IDS) def intify_attrs(stringy_attrs, strings_map=None, _do_deprecated=False):