From 74db1d9602c13feffbf1fd4fd03ecf6297e973f7 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Thu, 7 Mar 2019 12:52:30 +0100 Subject: [PATCH] Revert "Space out symbols enum, to make maintaining easier" This reverts commit be5235369cc23ad6838c21f0980c90cc20dc4f00. --- spacy/attrs.pxd | 13 ++++++------- spacy/symbols.pxd | 19 ++++++++++--------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/spacy/attrs.pxd b/spacy/attrs.pxd index a70fae04b..79a177ba9 100644 --- a/spacy/attrs.pxd +++ b/spacy/attrs.pxd @@ -1,9 +1,7 @@ -from . cimport symbols - # Reserve 64 values for flag features cdef enum attr_id_t: - NULL_ATTR = 0 - IS_ALPHA = symbols.IS_ALPHA + NULL_ATTR + IS_ALPHA IS_ASCII IS_DIGIT IS_LOWER @@ -22,7 +20,7 @@ cdef enum attr_id_t: IS_RIGHT_PUNCT IS_CURRENCY - FLAG19 = symbols.FLAG19 + FLAG19 = 19 FLAG20 FLAG21 FLAG22 @@ -68,7 +66,7 @@ cdef enum attr_id_t: FLAG62 FLAG63 - ID = symbols.ID + ID ORTH LOWER NORM @@ -76,7 +74,7 @@ cdef enum attr_id_t: PREFIX SUFFIX - LENGTH = symbols.LENGTH + LENGTH CLUSTER LEMMA POS @@ -88,4 +86,5 @@ cdef enum attr_id_t: SENT_START SPACY PROB + LANG diff --git a/spacy/symbols.pxd b/spacy/symbols.pxd index 1cd1f7ef7..051b92edb 100644 --- a/spacy/symbols.pxd +++ b/spacy/symbols.pxd @@ -19,7 +19,7 @@ cdef enum symbol_t: IS_RIGHT_PUNCT IS_CURRENCY - FLAG19 = 1000 + FLAG19 = 19 FLAG20 FLAG21 FLAG22 @@ -65,7 +65,7 @@ cdef enum symbol_t: FLAG62 FLAG63 - ID = 2000 + ID ORTH LOWER NORM @@ -73,7 +73,7 @@ cdef enum symbol_t: PREFIX SUFFIX - LENGTH = 3000 + LENGTH CLUSTER LEMMA POS @@ -87,7 +87,7 @@ cdef enum symbol_t: PROB LANG - ADJ = 4000 + ADJ ADP ADV AUX @@ -108,7 +108,7 @@ cdef enum symbol_t: EOL SPACE - Animacy_anim = 5000 + Animacy_anim Animacy_inan Animacy_hum # U20 Animacy_nhum @@ -385,7 +385,7 @@ cdef enum symbol_t: VerbType_mod # U VerbType_light # U - PERSON = 6000 + PERSON NORP FACILITY ORG @@ -397,7 +397,7 @@ cdef enum symbol_t: LANGUAGE LAW - DATE = 7000 + DATE TIME PERCENT MONEY @@ -405,8 +405,7 @@ cdef enum symbol_t: ORDINAL CARDINAL - acl = 8000 - acomp + acomp advcl advmod agent @@ -459,3 +458,5 @@ cdef enum symbol_t: rcmod root xcomp + + acl