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):