From 506cf2eb1389da6149f97de7db80df52ed0d2d1f Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Fri, 20 Oct 2017 14:00:23 +0200 Subject: [PATCH] Remove cpdef enum, to avoid too much code generation --- spacy/morphology.pyx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/spacy/morphology.pyx b/spacy/morphology.pyx index 4a1a0aa54..65b46fe08 100644 --- a/spacy/morphology.pyx +++ b/spacy/morphology.pyx @@ -426,3 +426,7 @@ IDS = { NAMES = [key for key, value in sorted(IDS.items(), key=lambda item: item[1])] +# Unfortunate hack here, to work around problem with long cpdef enum +# (which is generating an enormous amount of C++ in Cython 0.24+) +# We keep the enum cdef, and just make sure the names are available to Python +locals().update(IDS)